org.mozilla.jss.pkcs11
Class PK11MessageDigest
public final class PK11MessageDigest
Message Digesting with PKCS #11.
int | digest(byte[] outbuf, int offset, int len) - Completes digesting, storing the result into the provided array.
|
DigestAlgorithm | getAlgorithm() - Returns the algorithm that this digest uses.
|
void | initHMAC(SymmetricKey key) - Initializes an HMAC digest with the given symmetric key.
|
void | reset() - Resets this digest for further use.
|
void | update(byte[] input, int offset, int len) - Updates the digest with a portion of an array.
|
digest
public int digest(byte[] outbuf,
int offset,
int len)
throws DigestException
Completes digesting, storing the result into the provided array.
- digest in interface JSSMessageDigest
offset
- The offset in the buffer at which to store the output.len
- The amount of space available in the buffer for the
digest output.
- The number of bytes actually stored into buf.
initHMAC
public void initHMAC(SymmetricKey key)
throws DigestException,
InvalidKeyException
Initializes an HMAC digest with the given symmetric key. This also
has the effect of resetting the digest.
- initHMAC in interface JSSMessageDigest
reset
public void reset()
throws DigestException
Resets this digest for further use. This clears all input and
output streams. If this is an HMAC digest, the HMAC key is not
cleared.
- reset in interface JSSMessageDigest
update
public void update(byte[] input,
int offset,
int len)
throws DigestException
Updates the digest with a portion of an array.
- update in interface JSSMessageDigest
input
- An array from which to update the digest.offset
- The index in the array at which to start digesting.len
- The number of bytes to digest.