Package eu.webtoolkit.jwt.auth
Class PasswordHash
java.lang.Object
eu.webtoolkit.jwt.auth.PasswordHash
public class PasswordHash
extends java.lang.Object
A password hash.
This combines the information for interpreting a hashed password:
- the hash value
- the salt used
- the hashing function used
-
Constructor Summary
Constructors Constructor Description PasswordHash()
Default constructor.PasswordHash(java.lang.String function, java.lang.String salt, java.lang.String value)
Constructor. -
Method Summary
Modifier and Type Method Description java.lang.String
getFunction()
Returns the function identifier.java.lang.String
getSalt()
Returns the salt.java.lang.String
getValue()
Returns the hash value.boolean
isEmpty()
Returns whether the password is empty.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PasswordHash
public PasswordHash()Default constructor.Creates an empty password hash, i.e. with empty function, salt and value.
-
PasswordHash
public PasswordHash(java.lang.String function, java.lang.String salt, java.lang.String value)Constructor.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether the password is empty. -
getFunction
public java.lang.String getFunction()Returns the function identifier. -
getSalt
public java.lang.String getSalt()Returns the salt. -
getValue
public java.lang.String getValue()Returns the hash value.
-