public static interface Scrypt.Lazy
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
cryptoPwHashScryptSalsa208Sha256(java.lang.String password,
long hashLen,
byte[] salt,
long opsLimit,
long memLimit)
Hash a password using a salt.
|
java.lang.String |
cryptoPwHashScryptSalsa208Sha256Str(java.lang.String password,
long opsLimit,
long memLimit)
The most minimal way of hashing a given password
using Scrypt.
|
boolean |
cryptoPwHashScryptSalsa208Sha256StrVerify(java.lang.String hash,
java.lang.String password)
Verifies a string that was hashed
using Scrypt.
|
java.lang.String cryptoPwHashScryptSalsa208Sha256(java.lang.String password,
long hashLen,
byte[] salt,
long opsLimit,
long memLimit)
throws SodiumException
password - The password string to hash.hashLen - The length of the resulting hash. Between Scrypt.SCRYPTSALSA208SHA256_BYTES_MIN
and Scrypt.SCRYPTSALSA208SHA256_BYTES_MAX.salt - The salt to use.opsLimit - The number of cycles to perform whilst hashing.
Between Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MAX.memLimit - The amount of memory to use.
Between Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MAX.SodiumException - If the password could not be hashed.java.lang.String cryptoPwHashScryptSalsa208Sha256Str(java.lang.String password,
long opsLimit,
long memLimit)
throws SodiumException
password - The password string to hash.opsLimit - The number of cycles to perform whilst hashing.
Between Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MAX.memLimit - The amount of memory to use.
Between Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MAX.SodiumException - If the password could not be hashed.boolean cryptoPwHashScryptSalsa208Sha256StrVerify(java.lang.String hash,
java.lang.String password)
hash - The hash with or without a null terminating byte.password - The password