Class DatabasePrefixHandler


  • public class DatabasePrefixHandler
    extends 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 Detail

      • pattern

        protected Pattern pattern
    • Constructor Detail

      • DatabasePrefixHandler

        public DatabasePrefixHandler()
    • Method Detail

      • generatePrefix

        public String generatePrefix​(String algorithmName)
      • retrieveAlgorithmName

        public String retrieveAlgorithmName​(String encryptedPasswordWithPrefix)
      • removePrefix

        public String removePrefix​(String encryptedPasswordWithPrefix)