public class ShortenedDigest extends Object implements ExtendedDigest
| Constructor and Description |
|---|
ShortenedDigest(ExtendedDigest baseDigest,
int length)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
doFinal(byte[] out,
int outOff)
close the digest, producing the final digest value.
|
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.IllegalArgumentException - if baseDigest is null, or length is greater than baseDigest.getDigestSize().public 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 ExtendedDigestCopyright © 2015. All rights reserved.