All Superinterfaces:
GordianConsumer

public interface GordianDigest extends GordianConsumer
GordianKnot interface for Message Digests.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Calculate the digest.
    default byte[]
    finish(byte[] pBytes)
    Update the digest, calculate and reset it.
    int
    finish(byte[] pBuffer, int pOffset)
    Calculate the Digest, and return it in the buffer provided.
    int
    Obtain 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

      int finish(byte[] pBuffer, int pOffset) throws GordianException
      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