Class PBKDF2PasswordHasher

    • Constructor Detail

      • PBKDF2PasswordHasher

        public PBKDF2PasswordHasher()
    • Method Detail

      • createHash

        public String createHash​(char[] password)
        Returns a salted PBKDF2 hash of the password.
        Specified by:
        createHash in interface PasswordHasher
        Parameters:
        password - the password to hash
        Returns:
        a salted PBKDF2 hash of the password
      • validatePassword

        public boolean validatePassword​(char[] password,
                                        String correctHash)
        Validates a password using a hash.
        Specified by:
        validatePassword in interface PasswordHasher
        Parameters:
        password - the password to check
        correctHash - the hash of the valid password
        Returns:
        true if the password is correct, false if not