-
public interface GenericHash.Lazy
-
-
Method Summary
Modifier and Type Method Description abstract KeycryptoGenericHashKeygen()Generate a hashing key. abstract KeycryptoGenericHashKeygen(int size)Generate a hashing key with a size. abstract StringcryptoGenericHash(String in)Hash a string without a key. abstract StringcryptoGenericHash(String in, Key key)Hash a string with a key, so later on youcan verify the hashed string with the key. abstract booleancryptoGenericHashInit(GenericHash.State state, Key key, int outLen)Initialise a multi-part hashing operation. abstract booleancryptoGenericHashUpdate(GenericHash.State state, String in)Hash a part of a multi-part hash. abstract StringcryptoGenericHashFinal(GenericHash.State state, int outLen)Finalise the hashing operation. -
-
Method Detail
-
cryptoGenericHashKeygen
abstract Key cryptoGenericHashKeygen()
Generate a hashing key.
-
cryptoGenericHashKeygen
abstract Key cryptoGenericHashKeygen(int size)
Generate a hashing key with a size.
- Parameters:
size- The size of the hashing key betweenKEYBYTES and KEYBYTES_MAX.
-
cryptoGenericHash
abstract String cryptoGenericHash(String in)
Hash a string without a key.
- Parameters:
in- The string to hash.
-
cryptoGenericHash
abstract String cryptoGenericHash(String in, Key key)
Hash a string with a key, so later on youcan verify the hashed string with the key.If you're hashing a password please see cryptoPwHashString}instead.
- Parameters:
in- The string to hash.key- Can be null.
-
cryptoGenericHashInit
abstract boolean cryptoGenericHashInit(GenericHash.State state, Key key, int outLen)
Initialise a multi-part hashing operation.
- Parameters:
state- The state which holds the key and operation.key- The key as generated by cryptoGenericHashKeygen.outLen- The size of the final hash.
-
cryptoGenericHashUpdate
abstract boolean cryptoGenericHashUpdate(GenericHash.State state, String in)
Hash a part of a multi-part hash.
- Parameters:
state- State as put into cryptoGenericHashInit.in- A part of a string to hash.
-
cryptoGenericHashFinal
abstract String cryptoGenericHashFinal(GenericHash.State state, int outLen)
Finalise the hashing operation.
- Parameters:
state- State as put into cryptoGenericHashInit.outLen- The size of the final hash.
-
-
-
-