|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mozilla.jss.crypto.JSSMessageDigest
public abstract class JSSMessageDigest
A class for performing message digesting (hashing) and MAC operations.
| Constructor Summary | |
|---|---|
JSSMessageDigest()
|
|
| Method Summary | |
|---|---|
byte[] |
digest()
Completes digestion. |
byte[] |
digest(byte[] input)
Provides final data to the digest, then completes it and returns the output. |
abstract int |
digest(byte[] buf,
int offset,
int len)
Completes digesting, storing the result into the provided array. |
abstract DigestAlgorithm |
getAlgorithm()
Returns the algorithm that this digest uses. |
int |
getOutputSize()
Returns the length of the digest created by this digest's digest algorithm. |
abstract void |
initHMAC(SymmetricKey key)
Initializes an HMAC digest with the given symmetric key. |
abstract void |
reset()
Resets this digest for further use. |
void |
update(byte input)
Updates the digest with a single byte of input. |
void |
update(byte[] input)
Updates the digest with an array. |
abstract void |
update(byte[] input,
int offset,
int len)
Updates the digest with a portion of an array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSSMessageDigest()
| Method Detail |
|---|
public abstract void initHMAC(SymmetricKey key)
throws java.security.DigestException,
java.security.InvalidKeyException
java.security.DigestException - If this algorithm is not an HMAC algorithm.
java.security.InvalidKeyException - If the given key is not valid.
public void update(byte input)
throws java.security.DigestException
java.security.DigestException
public abstract void update(byte[] input,
int offset,
int len)
throws java.security.DigestException
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.
java.security.DigestException - If an error occurs while digesting.
public void update(byte[] input)
throws java.security.DigestException
input - An array to feed to the digest.
java.security.DigestException - If an error occurs while digesting.
public byte[] digest()
throws java.security.DigestException
java.security.DigestException - If an error occurs while digesting.
public abstract int digest(byte[] buf,
int offset,
int len)
throws java.security.DigestException
buf - The buffer in which to place the digest output.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.
java.security.DigestException - If the provided space is too small for
the digest, or an error occurs with the digest.
public byte[] digest(byte[] input)
throws java.security.DigestException
input - The digest's last meal.
java.security.DigestException - If an error occurs while digesting.
public abstract void reset()
throws java.security.DigestException
java.security.DigestExceptionpublic abstract DigestAlgorithm getAlgorithm()
public int getOutputSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||