public class HKDFBytesGenerator extends java.lang.Object implements DerivationFunction
| Constructor and Description |
|---|
HKDFBytesGenerator(Digest hash)
Creates a HKDFBytesGenerator based on the given hash function.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
extractPRK(byte[] salt,
byte[] ikm)
Performs the extract part of the key derivation function.
|
int |
generateBytes(byte[] out,
int outOff,
int len) |
Digest |
getDigest() |
void |
init(DerivationParameters param) |
public HKDFBytesGenerator(Digest hash)
hash - the digest to be used as the source of generatedBytes bytespublic void init(DerivationParameters param)
init in interface DerivationFunctionpublic byte[] extractPRK(byte[] salt,
byte[] ikm)
salt - the salt to useikm - the input keying materialpublic Digest getDigest()
public int generateBytes(byte[] out,
int outOff,
int len)
throws DataLengthException,
java.lang.IllegalArgumentException
generateBytes in interface DerivationFunctionDataLengthExceptionjava.lang.IllegalArgumentException