public static interface GenericHash.Native
| Modifier and Type | Method and Description |
|---|---|
boolean |
cryptoGenericHash(byte[] out,
int outLen,
byte[] in,
long inLen)
Hash a byte array without a key.
|
boolean |
cryptoGenericHash(byte[] out,
int outLen,
byte[] in,
long inLen,
byte[] key,
int keyLen)
Hash a byte array.
|
boolean |
cryptoGenericHashFinal(byte[] state,
byte[] out,
int outLen)
Now that the hash has finalised, the hash can
be put into
out. |
boolean |
cryptoGenericHashInit(byte[] state,
byte[] key,
int keyLength,
int outLen)
Hash multiple parts of a message.
|
boolean |
cryptoGenericHashInit(byte[] state,
int outLen)
Hash multiple parts of a message without a key
|
void |
cryptoGenericHashKeygen(byte[] k)
Generate a key.
|
int |
cryptoGenericHashStateBytes() |
boolean |
cryptoGenericHashUpdate(byte[] state,
byte[] in,
long inLen)
Update a multi-part hashing with another part.
|
void cryptoGenericHashKeygen(byte[] k)
k.k - A place to store the generated key
of size GenericHash.KEYBYTES. Though,
it may be between GenericHash.KEYBYTES
and GenericHash.KEYBYTES_MAX.boolean cryptoGenericHash(byte[] out,
int outLen,
byte[] in,
long inLen,
byte[] key,
int keyLen)
out - A place to store the resulting byte array.
You may choose the output size, however the minimum
recommended output size is GenericHash.BYTES.
You may also specify a value
between GenericHash.BYTES_MIN and GenericHash.BYTES_MAX.outLen - Size of out.in - The text to hash.inLen - The size of in.key - The key generated by cryptoGenericHashKeygen(byte[]).keyLen - The length of the key.boolean cryptoGenericHash(byte[] out,
int outLen,
byte[] in,
long inLen)
out - A place to store the resulting byte array.
You may choose the output size, however the minimum
recommended output size is GenericHash.BYTES.
You may also specify a value
between GenericHash.BYTES_MIN and GenericHash.BYTES_MAX.outLen - Size of out.in - The text to hash.inLen - The size of in.cryptoGenericHash(byte[], int, byte[], long, byte[], int)boolean cryptoGenericHashInit(byte[] state,
byte[] key,
int keyLength,
int outLen)
state - The state which holds the key
in memory for further hashing.key - The key generated by cryptoGenericHashKeygen(byte[]).keyLength - Length of the key.outLen - The size of the hash array. Please
see the param out in
cryptoGenericHash(byte[], int, byte[], long, byte[], int)
for more information.boolean cryptoGenericHashInit(byte[] state,
int outLen)
state - The state which holds the current state
in memory for further hashing.outLen - The size of the hash array. Please
see the param out in
cryptoGenericHash(byte[], int, byte[], long, byte[], int)
for more information.boolean cryptoGenericHashUpdate(byte[] state,
byte[] in,
long inLen)
state - The state.in - Another hash part.inLen - The length if the hash part.boolean cryptoGenericHashFinal(byte[] state,
byte[] out,
int outLen)
out.state - The state.out - The final hash.outLen - The length of the hash.int cryptoGenericHashStateBytes()