Class PasswordUtils

java.lang.Object
com.fredriksonsound.iot_backoffice_auth.util.PasswordUtils

public class PasswordUtils
extends java.lang.Object
Utility class for passwords
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String Hash​(java.lang.String password)
    Create salted hash from password
    static boolean verify​(java.lang.String password, java.lang.String hash)
    Verifies that a salted hashed password matches cleartext password

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • Hash

      public static java.lang.String Hash​(java.lang.String password)
      Create salted hash from password
      Parameters:
      password - the passsword to hash
      Returns:
      the string representation of the salted hash
    • verify

      public static boolean verify​(java.lang.String password, java.lang.String hash)
      Verifies that a salted hashed password matches cleartext password
      Parameters:
      password - the password to check
      hash - the hash to check against
      Returns:
      true if match, else false