Contract for password hashing and verification. More...
Public Member Functions | |
| PasswordHash | hash (char[] password, byte[] salt, int iterations) |
| Hashes a password using the specified salt and iterations. | |
| boolean | verify (char[] password, byte[] salt, int iterations, byte[] expectedHash) |
| Verifies a password against an expected hash. | |
Contract for password hashing and verification.
Definition at line 32 of file PasswordHasher.java.
| PasswordHash dev.rafex.ether.crypto.password.PasswordHasher.hash | ( | char[] | password, |
| byte[] | salt, | ||
| int | iterations ) |
Hashes a password using the specified salt and iterations.
| password | The password to hash. |
| salt | The random salt bytes. |
| iterations | The number of PBKDF2 iterations. |
PasswordHash. Implemented in dev.rafex.ether.crypto.password.PasswordHasherPBKDF2.
References dev.rafex.ether.crypto.password.PasswordHash().
| boolean dev.rafex.ether.crypto.password.PasswordHasher.verify | ( | char[] | password, |
| byte[] | salt, | ||
| int | iterations, | ||
| byte[] | expectedHash ) |
Verifies a password against an expected hash.
| password | The password to verify. |
| salt | The random salt bytes. |
| iterations | The number of PBKDF2 iterations. |
| expectedHash | The expected hash bytes. |
true if the password matches the expected hash, false otherwise. Implemented in dev.rafex.ether.crypto.password.PasswordHasherPBKDF2.