public class HKDFParameters extends java.lang.Object implements DerivationParameters
Constructor and Description |
---|
HKDFParameters(byte[] ikm,
byte[] salt,
byte[] info)
Generates parameters for HKDF, specifying both the optional salt and
optional info.
|
Modifier and Type | Method and Description |
---|---|
static HKDFParameters |
defaultParameters(byte[] ikm) |
byte[] |
getIKM()
Returns the input keying material or seed.
|
byte[] |
getInfo()
Returns the info field, which may be empty (null is converted to empty).
|
byte[] |
getSalt()
Returns the salt, or null if the salt should be generated as a byte array
of HashLen zeros.
|
boolean |
skipExtract()
Returns if step 1: extract has to be skipped or not
|
static HKDFParameters |
skipExtractParameters(byte[] ikm,
byte[] info)
Factory method that makes the HKDF skip the extract part of the key
derivation function.
|
public HKDFParameters(byte[] ikm, byte[] salt, byte[] info)
ikm
- the input keying material or seedsalt
- the salt to use, may be null for a salt for hashLen zerosinfo
- the info to use, may be null for an info field of zero bytespublic static HKDFParameters skipExtractParameters(byte[] ikm, byte[] info)
ikm
- the input keying material or seed, directly used for step 2:
Expandinfo
- the info to use, may be null for an info field of zero bytespublic static HKDFParameters defaultParameters(byte[] ikm)
public byte[] getIKM()
public boolean skipExtract()
public byte[] getSalt()
public byte[] getInfo()