Interface ByteDigester

  • All Known Implementing Classes:
    PooledByteDigester, StandardByteDigester

    public interface ByteDigester

    Common interface for all digesters which receive a byte array message and return a byte array digest.

    For a default implementation, see StandardByteDigester.

    Since:
    1.0
    Author:
    Daniel Fernández
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] digest​(byte[] message)
      Create a digest of the input message.
      boolean matches​(byte[] message, byte[] digest)
      Check whether a message matches a digest, managing aspects like salt, hashing iterations, etc.
    • Method Detail

      • digest

        byte[] digest​(byte[] message)

        Create a digest of the input message.

        Parameters:
        message - the message to be digested
        Returns:
        the digest
      • matches

        boolean matches​(byte[] message,
                        byte[] digest)

        Check whether a message matches a digest, managing aspects like salt, hashing iterations, etc. (if applicable).

        Parameters:
        message - the message to check
        digest - the digest to check
        Returns:
        TRUE if the message matches the digest, FALSE if not.