-
public interface GenericHash.Native
-
-
Method Summary
Modifier and Type Method Description abstract voidcryptoGenericHashKeygen(Array<byte> k)Generate a key. abstract booleancryptoGenericHash(Array<byte> out, int outLen, Array<byte> in, int inLen, Array<byte> key, int keyLen)Hash a byte array. abstract booleancryptoGenericHash(Array<byte> out, int outLen, Array<byte> in, int inLen)Hash a byte array without a key. abstract booleancryptoGenericHashInit(GenericHash.State state, Array<byte> key, int keyLength, int outLen)Hash multiple parts of a message. abstract booleancryptoGenericHashInit(GenericHash.State state, int outLen)Hash multiple parts of a message without a key abstract booleancryptoGenericHashUpdate(GenericHash.State state, Array<byte> in, int inLen)Update a multi-part hashing with another part. abstract booleancryptoGenericHashFinal(GenericHash.State state, Array<byte> out, int outLen)Now that the hash has finalised, the hash canbe put into {@code out}.-
-
Method Detail
-
cryptoGenericHashKeygen
abstract void cryptoGenericHashKeygen(Array<byte> k)
Generate a key. Store the key in
{@code k}.- Parameters:
k- A place to store the generated keyof size KEYBYTES.
-
cryptoGenericHash
abstract boolean cryptoGenericHash(Array<byte> out, int outLen, Array<byte> in, int inLen, Array<byte> key, int keyLen)
Hash a byte array.
- Parameters:
out- A place to store the resulting byte array.outLen- Size of out.in- The text to hash.inLen- The size of in.key- The key generated by cryptoGenericHashKeygen.keyLen- The length of the key.
-
cryptoGenericHash
abstract boolean cryptoGenericHash(Array<byte> out, int outLen, Array<byte> in, int inLen)
Hash a byte array without a key.
- Parameters:
out- A place to store the resulting byte array.outLen- Size of out.in- The text to hash.inLen- The size of in.
-
cryptoGenericHashInit
abstract boolean cryptoGenericHashInit(GenericHash.State state, Array<byte> key, int keyLength, int outLen)
Hash multiple parts of a message.
- Parameters:
state- The state which holds the current statein memory for further hashing.key- The key generated by cryptoGenericHashKeygen.keyLength- Length of the key.outLen- The size of the hash array.
-
cryptoGenericHashInit
abstract boolean cryptoGenericHashInit(GenericHash.State state, int outLen)
Hash multiple parts of a message without a key
- Parameters:
state- The state which holds the current statein memory for further hashing.outLen- The size of the hash array.
-
cryptoGenericHashUpdate
abstract boolean cryptoGenericHashUpdate(GenericHash.State state, Array<byte> in, int inLen)
Update a multi-part hashing with another part.
- Parameters:
state- The state.in- Another hash part.inLen- The length if the hash part.
-
cryptoGenericHashFinal
abstract boolean cryptoGenericHashFinal(GenericHash.State state, Array<byte> out, int outLen)
Now that the hash has finalised, the hash canbe put into
{@code out}.- Parameters:
state- The state.out- The final hash.outLen- The length of the hash.
-
-
-
-