ibm.security.internal.spec
Class HKDFParameterSpec
- java.lang.Object
-
- ibm.security.internal.spec.HKDFParameterSpec
-
- All Implemented Interfaces:
- java.security.spec.AlgorithmParameterSpec
public class HKDFParameterSpec extends java.lang.Object implements java.security.spec.AlgorithmParameterSpecThis class specifies the set of parameters used with HKDFParameterSpec- Since:
- 1.8
-
-
Constructor Summary
Constructors Constructor and Description HKDFParameterSpec(byte[] inKeyMaterial, byte[] salt, byte[] info, long okmLength, java.lang.String keyAlgorithm)Constructs a parameter set for HKDFParameterSpec.HKDFParameterSpec(SecretKey inKey, byte[] salt, byte[] info, long okmLength, java.lang.String keyAlgorithm)Constructs a parameter set for HKDFParameterSpec.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description byte[]getInfo()Returns the info that contains optional context and application specific informationbyte[]getInKeyMaterial()Returns the input key materialjava.lang.StringgetKeyAlgorithm()Returns the name of the key algorithmlonggetOkmLength()Returns the length of output Key Materialbyte[]getSalt()Returns the salt
-
-
-
Constructor Detail
-
HKDFParameterSpec
public HKDFParameterSpec(byte[] inKeyMaterial, byte[] salt, byte[] info, long okmLength, java.lang.String keyAlgorithm)Constructs a parameter set for HKDFParameterSpec. The parameters are copied from the parameters to protect against subsequent modification.- Parameters:
inKeyMaterial- the inKeyMaterial.salt- the salt.info- the info that contains optional context and application specific information.okmLength- output Key material length.keyAlgorithm- the name of the algorithm to use when creating SecretKey.- Throws:
java.lang.IllegalArgumentException- if input key material isnull.
-
HKDFParameterSpec
public HKDFParameterSpec(SecretKey inKey, byte[] salt, byte[] info, long okmLength, java.lang.String keyAlgorithm)
Constructs a parameter set for HKDFParameterSpec. The parameters are copied from the parameters to protect against subsequent modification.- Parameters:
inKey- the secret input key. Cannot be null.salt- the salt.info- the info that contains optional context and application specific information.okmLength- output Key material length.keyAlgorithm- the name of the algorithm to use when creating SecretKey.- Throws:
java.lang.IllegalArgumentException- if input key isnull.
-
-
Method Detail
-
getSalt
public byte[] getSalt()
Returns the salt- Returns:
- the salt. Returns a new array each time this method is called.
-
getInKeyMaterial
public byte[] getInKeyMaterial()
Returns the input key material- Returns:
- the input key material.
-
getKeyAlgorithm
public java.lang.String getKeyAlgorithm()
Returns the name of the key algorithm- Returns:
- the name of the key algorithm.
-
getInfo
public byte[] getInfo()
Returns the info that contains optional context and application specific information- Returns:
- the info. Returns a new array each time this method is called.
-
getOkmLength
public long getOkmLength()
Returns the length of output Key Material- Returns:
- the length of output Key Material.
-
-