Interface GordianDigest
- All Superinterfaces:
GordianConsumer
GordianKnot interface for Message Digests.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]finish()Calculate the digest.default byte[]finish(byte[] pBytes) Update the digest, calculate and reset it.intfinish(byte[] pBuffer, int pOffset) Calculate the Digest, and return it in the buffer provided.intObtain the digest size.Obtain DigestSpec.Methods inherited from interface io.github.tonywasher.joceanus.gordianknot.api.base.GordianConsumer
reset, update, update, update
-
Method Details
-
getDigestSpec
GordianDigestSpec getDigestSpec()Obtain DigestSpec.- Returns:
- the digestSpec
-
getDigestSize
int getDigestSize()Obtain the digest size.- Returns:
- the digest size
-
finish
byte[] finish()Calculate the digest.- Returns:
- the digest
-
finish
Calculate the Digest, and return it in the buffer provided.- Parameters:
pBuffer- the buffer to return the digest in.pOffset- the offset in the buffer to store the digest.- Returns:
- the number of bytes placed into buffer
- Throws:
GordianException- on error
-
finish
default byte[] finish(byte[] pBytes) Update the digest, calculate and reset it.- Parameters:
pBytes- the bytes to update with.- Returns:
- the digest
-