Package eu.webtoolkit.jwt.auth
Class BCryptHashFunction
java.lang.Object
eu.webtoolkit.jwt.auth.HashFunction
eu.webtoolkit.jwt.auth.BCryptHashFunction
A cryptograhpic hash function implemented using BCrypt.
This hash function can be used for creating password hashes.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BCryptHashFunction
public BCryptHashFunction()
-
-
Method Details
-
getName
Returns the name for this hash function. Returns "BCrypt".- Specified by:
getNamein classHashFunction
-
compute
Description copied from class:HashFunctionComputes the hash of a message + salt.The message is usually an ASCII or UTF-8 string.
The
saltand the computed hash are encoded in printable characters. This is usually ASCII-encoded or could be Base64-encoded.- Specified by:
computein classHashFunction
-
verify
Description copied from class:HashFunctionVerifies a message with the salted hash.The base implementation will recompute the hash of the message with the given salt, and compare it to the
hash.Some methods however store the salt and additional settings in the
hash, and this information is thus needed to verify the message hash.- Overrides:
verifyin classHashFunction
-
main
-