public static interface GenericHash.Lazy
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
cryptoGenericHash(java.lang.String in)
Hash a string without a key.
|
java.lang.String |
cryptoGenericHash(java.lang.String in,
Key key)
Hash a string with a key, so later on you
can verify the hashed string with the key.
|
java.lang.String |
cryptoGenericHashFinal(byte[] state,
int outLen)
Finalise the hashing operation.
|
boolean |
cryptoGenericHashInit(byte[] state,
Key key,
int outLen)
Initialise a multi-part hashing operation.
|
Key |
cryptoGenericHashKeygen()
Generate a hashing key.
|
Key |
cryptoGenericHashKeygen(int size)
Generate a hashing key with a size.
|
boolean |
cryptoGenericHashUpdate(byte[] state,
java.lang.String in)
Hash a part of a multi-part hash.
|
Key cryptoGenericHashKeygen()
Key cryptoGenericHashKeygen(int size) throws SodiumException
size - The size of the hashing key between
GenericHash.KEYBYTES and GenericHash.KEYBYTES_MAX.SodiumExceptionjava.lang.String cryptoGenericHash(java.lang.String in)
throws SodiumException
in - The string to hash.SodiumExceptionjava.lang.String cryptoGenericHash(java.lang.String in,
Key key)
throws SodiumException
PwHash.Lazy.cryptoPwHashStr(String, long, NativeLong)}
instead.in - The string to hash.key - Can be null.SodiumExceptionboolean cryptoGenericHashInit(byte[] state,
Key key,
int outLen)
state - The state which holds the key and operation.key - The key as generated by cryptoGenericHashKeygen().outLen - The size of the final hash.boolean cryptoGenericHashUpdate(byte[] state,
java.lang.String in)
throws SodiumException
state - State as put into cryptoGenericHashInit(byte[], Key, int).in - A part of a string to hash.SodiumExceptionjava.lang.String cryptoGenericHashFinal(byte[] state,
int outLen)
throws SodiumException
state - State as put into cryptoGenericHashInit(byte[], Key, int).outLen - The size of the final hash.SodiumException