HFunction.MacHFunction, HFunction.MessageDigestHFunction| Constructor and Description |
|---|
MessageDigestHFunction(MessageDigest digest) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calculate()
After adding the input through
HFunction.update(byte[]) calculate the output of the
H-function |
int |
getHFuncOutputBytes()
Formally: a positive integer that indicates the length of the output of
the auxiliary function, H, that is used to derive blocks of secret keying material.
|
void |
init(byte[] key)
Optional keying of the H function.
|
boolean |
requireInit()
If the function requires a key to be provided in the
HFunction.init(byte[]) |
void |
reset()
Resets the function for further use.
|
void |
update(byte[] array)
Update the function with a new input that will internally added to the
already available input
|
public MessageDigestHFunction(MessageDigest digest)
public void init(byte[] key)
HFunctionUnsupportedOperationException. Call this before HFunction.update(byte[])public boolean requireInit()
HFunctionHFunction.init(byte[])requireInit in interface HFunctionpublic int getHFuncOutputBytes()
HFunctionThe spec describes the length in bits, but for practical reasons it will return bytes.
Practically the length of output hash/hmac/kmac function. E.g. SHA-256 or HMAC_SHA-256 will output 32 byte long block.
getHFuncOutputBytes in interface HFunctionpublic void update(byte[] array)
HFunctionpublic byte[] calculate()
HFunctionHFunction.update(byte[]) calculate the output of the
H-functionCopyright © 2018. All rights reserved.