Interface SimpleDigestPassword

All Superinterfaces:
Cloneable, Key, OneWayPassword, Password, Serializable

public interface SimpleDigestPassword extends OneWayPassword
A simple single digest based password.
Author:
David M. Lloyd
  • Field Details

    • ALGORITHM_SIMPLE_DIGEST_MD2

      static final String ALGORITHM_SIMPLE_DIGEST_MD2
      The algorithm name "simple-digest-md2".
      See Also:
    • ALGORITHM_SIMPLE_DIGEST_MD5

      static final String ALGORITHM_SIMPLE_DIGEST_MD5
      The algorithm name "simple-digest-md5".
      See Also:
    • ALGORITHM_SIMPLE_DIGEST_SHA_1

      static final String ALGORITHM_SIMPLE_DIGEST_SHA_1
      The algorithm name "simple-digest-sha-1".
      See Also:
    • ALGORITHM_SIMPLE_DIGEST_SHA_256

      static final String ALGORITHM_SIMPLE_DIGEST_SHA_256
      The algorithm name "simple-digest-sha-256".
      See Also:
    • ALGORITHM_SIMPLE_DIGEST_SHA_384

      static final String ALGORITHM_SIMPLE_DIGEST_SHA_384
      The algorithm name "simple-digest-sha-384".
      See Also:
    • ALGORITHM_SIMPLE_DIGEST_SHA_512

      static final String ALGORITHM_SIMPLE_DIGEST_SHA_512
      The algorithm name "simple-digest-sha-512".
      See Also:
  • Method Details

    • getDigest

      byte[] getDigest()
      Get the digest of this password.
      Returns:
      the digest
    • clone

      Creates and returns a copy of this Password.
      Specified by:
      clone in interface OneWayPassword
      Specified by:
      clone in interface Password
      Returns:
      a copy of this Password.
    • createRaw

      static SimpleDigestPassword createRaw(String algorithm, byte[] digest)
      Create a raw implementation of this password type. No validation of the content is performed, and the password must be "adopted" in to a PasswordFactory (via the PasswordFactory.translate(Password) method) before it can be validated and used to verify guesses.
      Parameters:
      algorithm - the algorithm name
      digest - the digest
      Returns:
      the raw password implementation