interface HashStrategy
Determines how the hashing is computed in the implementation You can implement this to provide a different hashing strategy to the default.
Author
mremme
abstract fun computeHash(password: String, user: User): String
Compute the hashed password given the unhashed password and the user |
|
abstract fun getSalt(user: User): String
Retrieve the salt. The source of the salt can be the external salt or the propriate column of the given user, depending on the defined HashSaltStyle |
|
abstract fun getSaltStyle(): HashSaltStyle
Get the defined HashSaltStyle of the current instance |
|
abstract fun getStoredPwd(user: User): String
Retrieve the password from the user, or as clear text or as hashed version, depending on the definition |
|
abstract fun setAlgorithm(algorithm: HashAlgorithm): Unit
Allows the selection of the hashing algorithm. |
|
abstract fun setExternalSalt(salt: String): Unit
Set an external salt. This method should be used in case of |
|
abstract fun setSaltStyle(saltStyle: HashSaltStyle): Unit
Set the saltstyle as defined by HashSaltStyle. |