Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.pkcs11
Class PK11MessageDigest

    java.lang.Object
      |
      +--org.mozilla.jss.crypto.JSSMessageDigest
            |
            +--org.mozilla.jss.pkcs11.PK11MessageDigest

public final class PK11MessageDigest
extends JSSMessageDigest

Message Digesting with PKCS #11.

Field Summary
`private DigestAlgorithm` | `alg`
`private CipherContextProxy` | `digestProxy`
`private PK11SymKey` | `hmacKey`
`private PK11Token` | `token`

Constructor Summary
`(package private)` | `PK11MessageDigest(PK11Token token, DigestAlgorithm alg)`

Method Summary
`int` | `digest(byte[] outbuf, int offset, int len)`
`private static int` | `digest(CipherContextProxy proxy, byte[] outbuf, int offset, int len)`
`DigestAlgorithm` | `getAlgorithm()`
`private static CipherContextProxy` | `initDigest(DigestAlgorithm alg)`
`private static CipherContextProxy` | `initHMAC(PK11Token token, DigestAlgorithm alg, PK11SymKey key)`
`void` | `initHMAC(SymmetricKey key)`
`void` | `reset()`
`void` | `update(byte[] input, int offset, int len)`
`private static void` | `update(CipherContextProxy proxy, byte[] inbuf, int offset, int len)`

Methods inherited from class org.mozilla.jss.crypto.JSSMessageDigest
`digest, digest, getOutputSize, update, update`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### token

    private PK11Token token

### digestProxy

    private CipherContextProxy digestProxy

### hmacKey

    private PK11SymKey hmacKey

### alg

    private DigestAlgorithm alg

Constructor Detail

### PK11MessageDigest

    PK11MessageDigest(PK11Token token,
                      DigestAlgorithm alg)
                throws java.security.NoSuchAlgorithmException,
                       java.security.DigestException

Method Detail

### initHMAC

    public void initHMAC(SymmetricKey key)
                  throws java.security.DigestException,
                         java.security.InvalidKeyException

  Overrides:
    initHMAC in class JSSMessageDigest

### update

    public void update(byte[] input,
                       int offset,
                       int len)
                throws java.security.DigestException

  Overrides:
    update in class JSSMessageDigest

### digest

    public int digest(byte[] outbuf,
                      int offset,
                      int len)
               throws java.security.DigestException

  Overrides:
    digest in class JSSMessageDigest

### reset

    public void reset()
               throws java.security.DigestException

  Overrides:
    reset in class JSSMessageDigest

### getAlgorithm

    public DigestAlgorithm getAlgorithm()

  Overrides:
    getAlgorithm in class JSSMessageDigest

### initDigest

    private static CipherContextProxy initDigest(DigestAlgorithm alg)
                                          throws java.security.DigestException

### initHMAC

    private static CipherContextProxy initHMAC(PK11Token token,
                                               DigestAlgorithm alg,
                                               PK11SymKey key)
                                        throws java.security.DigestException

### update

    private static void update(CipherContextProxy proxy,
                               byte[] inbuf,
                               int offset,
                               int len)

### digest

    private static int digest(CipherContextProxy proxy,
                              byte[] outbuf,
                              int offset,
                              int len)

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD