Digest, ExtendedDigestpublic class ShortenedDigest extends java.lang.Object implements ExtendedDigest
| Constructor | Description |
|---|---|
ShortenedDigest(ExtendedDigest baseDigest,
int length) |
Base constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
doFinal(byte[] out,
int outOff) |
close the digest, producing the final digest value.
|
java.lang.String |
getAlgorithmName() |
return the algorithm name
|
int |
getByteLength() |
Return the size in bytes of the internal buffer the digest applies it's compression
function to.
|
int |
getDigestSize() |
return the size, in bytes, of the digest produced by this message digest.
|
void |
reset() |
reset the digest back to it's initial state.
|
void |
update(byte in) |
update the message digest with a single byte.
|
void |
update(byte[] in,
int inOff,
int len) |
update the message digest with a block of bytes.
|
public ShortenedDigest(ExtendedDigest baseDigest, int length)
baseDigest - underlying digest to use.length - length in bytes of the output of doFinal.java.lang.IllegalArgumentException - if baseDigest is null, or length is greater than baseDigest.getDigestSize().public java.lang.String getAlgorithmName()
DigestgetAlgorithmName in interface Digestpublic int getDigestSize()
DigestgetDigestSize in interface Digestpublic void update(byte in)
Digestpublic void update(byte[] in,
int inOff,
int len)
Digestpublic int doFinal(byte[] out,
int outOff)
Digestpublic void reset()
Digestpublic int getByteLength()
ExtendedDigestgetByteLength in interface ExtendedDigest