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()
Digest
getAlgorithmName
in interface Digest
public int getDigestSize()
Digest
getDigestSize
in interface Digest
public void update(byte in)
Digest
public void update(byte[] in, int inOff, int len)
Digest
public int doFinal(byte[] out, int outOff)
Digest
public void reset()
Digest
public int getByteLength()
ExtendedDigest
getByteLength
in interface ExtendedDigest
Copyright © 2015. All rights reserved.