| Constructor and Description |
|---|
Argon2i()
Constructor.
|
Argon2i(int saltLen,
int hashLen)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
callLibraryHash(byte[] pwd,
byte[] salt,
Uint32_t iterations,
Uint32_t memory,
Uint32_t parallelism,
byte[] encoded)
Is called when the hash function of the native library should be called.
|
protected int |
callLibraryVerify(byte[] encoded,
byte[] pwd)
Is called when the verify function of the native library should be
called.
|
protected int |
getHashLength()
Returns the hash length in bytes.
|
String |
hash(int iterations,
int memory,
int parallelism,
char[] password)
Hashes a password.
|
String |
hash(int iterations,
int memory,
int parallelism,
char[] password,
Charset charset)
Hashes a password.
|
String |
hash(int iterations,
int memory,
int parallelism,
String password)
Hashes a password.
|
String |
hash(int iterations,
int memory,
int parallelism,
String password,
Charset charset)
Hashes a password.
|
boolean |
verify(String hash,
char[] password)
Verifies a password against a hash.
|
boolean |
verify(String hash,
char[] password,
Charset charset)
Verifies a password against a hash.
|
boolean |
verify(String hash,
String password)
Verifies a password against a hash.
|
boolean |
verify(String hash,
String password,
Charset charset)
Verifies a password against a hash.
|
void |
wipeArray(char[] array)
Wipes the data from the given array.
|
public Argon2i()
Uses default salt and hash lengths.
public Argon2i(int saltLen,
int hashLen)
saltLen - Salt length in bytes.hashLen - Hash length in bytes.protected int callLibraryHash(byte[] pwd,
byte[] salt,
Uint32_t iterations,
Uint32_t memory,
Uint32_t parallelism,
byte[] encoded)
pwd - Password.salt - Salt.iterations - Iterations.memory - Memory.parallelism - Parallelism.encoded - Byte array to write the hash to.protected int callLibraryVerify(byte[] encoded,
byte[] pwd)
encoded - Buffer.pwd - Password.protected int getHashLength()
public String hash(int iterations, int memory, int parallelism, char[] password)
Argon2public String hash(int iterations, int memory, int parallelism, char[] password, Charset charset)
Argon2public String hash(int iterations, int memory, int parallelism, String password, Charset charset)
Argon2public String hash(int iterations, int memory, int parallelism, String password)
Argon2public boolean verify(String hash, String password)
Argon2public boolean verify(String hash, String password, Charset charset)
Argon2public boolean verify(String hash, char[] password, Charset charset)
Argon2public boolean verify(String hash, char[] password)
Argon2public void wipeArray(char[] array)
Argon2Use this method after hash creation / verification on the array which contains the user password.
Copyright © 2016. All rights reserved.