java.lang.Object
com.github.jh3nd3rs0n.jargyle.common.security.EncryptedPassword

public final class EncryptedPassword extends Object
An encrypted password.
  • Method Details

    • newInstance

      public static EncryptedPassword newInstance(char[] password)
      Returns a new EncryptedPassword of the provided password.
      Parameters:
      password - the provided password
      Returns:
      a new EncryptedPassword of the provided password
    • newInstanceFrom

      public static EncryptedPassword newInstanceFrom(String s)
      Returns a new EncryptedPassword from the provided String. An IllegalArgumentException is thrown if the provided String is invalid.
      Parameters:
      s - the provided String
      Returns:
      a new EncryptedPassword from the provided String
    • newInstance

      public static EncryptedPassword newInstance(String typeName, String encryptedPasswordValue)
      Returns a new EncryptedPassword with the provided name of the type of EncryptedPassword specified by a EncryptedPasswordSpec and with the parsed EncryptedPasswordValue from the provided String value. An IllegalArgumentException is thrown if the provided name of the type of EncryptedPassword is not specified by any EncryptedPasswordSpec or the provided String value to be parsed as an EncryptedPasswordValue is invalid.
      Parameters:
      typeName - the provided name of the type of EncryptedPassword specified by a EncryptedPasswordSpec
      encryptedPasswordValue - the provided String value to be parsed as an EncryptedPasswordValue
      Returns:
      a new EncryptedPassword with the provided name of the type of EncryptedPassword specified by a EncryptedPasswordSpec and with the parsed EncryptedPasswordValue from the provided String value
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getEncryptedPasswordSpec

      public EncryptedPasswordSpec getEncryptedPasswordSpec()
      Returns the EncryptedPasswordSpec of this EncryptedPassword.
      Returns:
      the EncryptedPasswordSpec of this EncryptedPassword
    • getEncryptedPasswordValue

      public EncryptedPasswordValue getEncryptedPasswordValue()
      Returns the EncryptedPasswordValue of this EncryptedPassword.
      Returns:
      the EncryptedPasswordValue of this EncryptedPassword
    • getPassword

      public char[] getPassword()
      Returns the decrypted password of this EncryptedPassword.
      Returns:
      the decrypted password of this EncryptedPassword
    • getTypeName

      public String getTypeName()
      Returns the name of the type of this EncryptedPassword.
      Returns:
      the name of the type of this EncryptedPassword
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Retyrns the String representation of this EncryptedPassword. The String representation is the name of the type of this EncryptedPassword followed by a colon (:) followed by the String representation of the EncryptedPasswordValue of this EncryptedPassword.
      Overrides:
      toString in class Object
      Returns:
      the String representation of this EncryptedPassword