Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.crypto.password.PasswordHasher Interface Reference

Contract for password hashing and verification. More...

Inheritance diagram for dev.rafex.ether.crypto.password.PasswordHasher:
Collaboration diagram for dev.rafex.ether.crypto.password.PasswordHasher:

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.

Detailed Description

Contract for password hashing and verification.

Definition at line 32 of file PasswordHasher.java.

Member Function Documentation

◆ hash()

PasswordHash dev.rafex.ether.crypto.password.PasswordHasher.hash ( char[] password,
byte[] salt,
int iterations )

Hashes a password using the specified salt and iterations.

Parameters
passwordThe password to hash.
saltThe random salt bytes.
iterationsThe number of PBKDF2 iterations.
Returns
The resulting PasswordHash.

Implemented in dev.rafex.ether.crypto.password.PasswordHasherPBKDF2.

References dev.rafex.ether.crypto.password.PasswordHash().

Here is the call graph for this function:

◆ verify()

boolean dev.rafex.ether.crypto.password.PasswordHasher.verify ( char[] password,
byte[] salt,
int iterations,
byte[] expectedHash )

Verifies a password against an expected hash.

Parameters
passwordThe password to verify.
saltThe random salt bytes.
iterationsThe number of PBKDF2 iterations.
expectedHashThe expected hash bytes.
Returns
true if the password matches the expected hash, false otherwise.

Implemented in dev.rafex.ether.crypto.password.PasswordHasherPBKDF2.


The documentation for this interface was generated from the following file: