Class Base64EncodedHashDigest

  • Direct Known Subclasses:
    Sha512HashDigest, ShaHashDigest

    public abstract class Base64EncodedHashDigest
    extends java.lang.Object
    Author:
    Daniel Meyer
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean check​(java.lang.String password, java.lang.String encrypted)  
      protected byte[] createByteHash​(java.lang.String password)  
      protected java.security.MessageDigest createDigestInstance()  
      protected java.lang.String encodeHash​(byte[] hash)  
      java.lang.String encrypt​(java.lang.String password)  
      protected abstract java.lang.String hashAlgorithmName()
      allows subclasses to select the hash algorithm
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Base64EncodedHashDigest

        public Base64EncodedHashDigest()
    • Method Detail

      • encrypt

        public java.lang.String encrypt​(java.lang.String password)
      • check

        public boolean check​(java.lang.String password,
                             java.lang.String encrypted)
      • createByteHash

        protected byte[] createByteHash​(java.lang.String password)
      • createDigestInstance

        protected java.security.MessageDigest createDigestInstance()
      • encodeHash

        protected java.lang.String encodeHash​(byte[] hash)
      • hashAlgorithmName

        protected abstract java.lang.String hashAlgorithmName()
        allows subclasses to select the hash algorithm