-
public interface PwHash.Lazy
-
-
Method Summary
Modifier and Type Method Description abstract StringcryptoPwHash(String password, int cryptoPwHashLen, Array<byte> salt, long opsLimit, NativeLong memLimit, PwHash.Alg alg)Hashes a given password. abstract StringcryptoPwHashString(String password, long opsLimit, NativeLong memLimit)The most minimal way of hashing a given password to a standard-format string including all used parameters. abstract StringcryptoPwHashStr(String password, long opsLimit, NativeLong memLimit)The most minimal way of hashing a given password to a string including all used parameters. abstract StringcryptoPwHashStrRemoveNulls(String password, long opsLimit, NativeLong memLimit)Hashes a string to a string representation including the used parameters, and removes alluseless null bytes. abstract booleancryptoPwHashStrVerify(String hash, String password)Verifies a password represented as a long encoded string generated by cryptoPwHashStr or cryptoPwHashStrRemoveNulls. abstract booleancryptoPwHashStringVerify(String hash, String password)Verifies a password represented as a standard-formatted hash, generated by cryptoPwHashString. abstract PwHash.NeedsRehashResultcryptoPwHashStringNeedsRehash(String hash, long opsLimit, NativeLong memLimit)Checks whether the hash needs a rehash. -
-
Method Detail
-
cryptoPwHash
abstract String cryptoPwHash(String password, int cryptoPwHashLen, Array<byte> salt, long opsLimit, NativeLong memLimit, PwHash.Alg alg)
Hashes a given password.
- Parameters:
password- The password to hash.cryptoPwHashLen- The hash size that you want.salt- A salt to use with the hash, generated randomly.opsLimit- The number of cycles to perform whilst hashing.memLimit- The amount of memory to use.alg- The algorithm to use.
-
cryptoPwHashString
abstract String cryptoPwHashString(String password, long opsLimit, NativeLong memLimit)
The most minimal way of hashing a given password to a standard-format string including all used parameters.We auto-generate the salt and use the default hashing algorithm PwHash.Alg.
- Parameters:
password- The password string to hash.opsLimit- The number of cycles to perform whilst hashing.memLimit- The amount of memory to use.
-
cryptoPwHashStr
@Deprecated() abstract String cryptoPwHashStr(String password, long opsLimit, NativeLong memLimit)
The most minimal way of hashing a given password to a string including all used parameters.We auto-generate the salt and use the default hashing algorithm PwHash.Alg.
- Parameters:
password- The password string to hash.opsLimit- The number of cycles to perform whilst hashing.memLimit- The amount of memory to use.
-
cryptoPwHashStrRemoveNulls
@Deprecated() abstract String cryptoPwHashStrRemoveNulls(String password, long opsLimit, NativeLong memLimit)
Hashes a string to a string representation including the used parameters, and removes alluseless null bytes. Uses the hashing algorithm PwHash.Alg.
- Parameters:
password- The password string to hash.opsLimit- The number of cycles to perform whilst hashing.memLimit- The amount of memory to use.
-
cryptoPwHashStrVerify
@Deprecated() abstract boolean cryptoPwHashStrVerify(String hash, String password)
Verifies a password represented as a long encoded string generated by cryptoPwHashStr or cryptoPwHashStrRemoveNulls.
- Parameters:
hash- The encoded hash generated by cryptoPwHashStr or cryptoPwHashStrRemoveNullspassword- The password.
-
cryptoPwHashStringVerify
abstract boolean cryptoPwHashStringVerify(String hash, String password)
Verifies a password represented as a standard-formatted hash, generated by cryptoPwHashString.
- Parameters:
hash- Standard-formatted hashpassword- The password.
-
cryptoPwHashStringNeedsRehash
abstract PwHash.NeedsRehashResult cryptoPwHashStringNeedsRehash(String hash, long opsLimit, NativeLong memLimit)
Checks whether the hash needs a rehash.
- Parameters:
hash- Standard-formatted hash generated by cryptoPwHashString.opsLimit- The operations limit which should be used.memLimit- The memory limit which should be used.
-
-
-
-