Class DatabasePrefixHandler


  • public class DatabasePrefixHandler
    extends java.lang.Object
    In order to distinguish between the used hashed algorithm for the password encryption, as prefix is persisted with the encrypted to the database. The DatabasePrefixHandler is used to handle the prefix, especially for building the prefix, retrieving the algorithm name from the prefix and removing the prefix name from the hashed password.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.regex.Pattern pattern  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generatePrefix​(java.lang.String algorithmName)  
      java.lang.String removePrefix​(java.lang.String encryptedPasswordWithPrefix)  
      java.lang.String retrieveAlgorithmName​(java.lang.String encryptedPasswordWithPrefix)  
      • Methods inherited from class java.lang.Object

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

      • pattern

        protected java.util.regex.Pattern pattern
    • Constructor Detail

      • DatabasePrefixHandler

        public DatabasePrefixHandler()
    • Method Detail

      • generatePrefix

        public java.lang.String generatePrefix​(java.lang.String algorithmName)
      • retrieveAlgorithmName

        public java.lang.String retrieveAlgorithmName​(java.lang.String encryptedPasswordWithPrefix)
      • removePrefix

        public java.lang.String removePrefix​(java.lang.String encryptedPasswordWithPrefix)