Class PasswordHash
java.lang.Object
io.getlime.security.powerauth.crypto.lib.util.PasswordHash
Utility class that provides password hashing functionality using the Argon2 algorithm.
- Author:
- Roman Strobl, roman.strobl@wultra.com
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PasswordHash
public PasswordHash()
-
-
Method Details
-
hash
Generate hash in Argon2 Modular Crypt Format for specified password using Argon2i algorithm.- Parameters:
password- Password bytes.- Returns:
- Hash String in Argon2 Modular Crypt Format.
- Throws:
CryptoProviderException- In case key cryptography provider is incorrectly initialized.
-
verify
Verify password hash for specified password and password hash in Modular Crypt Format.- Parameters:
password- Password bytes for verification.argon2Hash- Password hash in Argon2 Modular Crypt Format.- Returns:
- Whether password verification succeeded.
- Throws:
IOException- In case parsing of hash fails.
-