ibm.security.internal.spec
Class HKDFExpandParameterSpec
- java.lang.Object
-
- ibm.security.internal.spec.HKDFExpandParameterSpec
-
- All Implemented Interfaces:
- java.security.spec.AlgorithmParameterSpec
public class HKDFExpandParameterSpec extends java.lang.Object implements java.security.spec.AlgorithmParameterSpec
This class specifies the set of parameters used with HKDFExpandParameterSpec- Since:
- 1.8
-
-
Constructor Summary
Constructors Constructor and Description HKDFExpandParameterSpec(byte[] prk, byte[] info, long okmLength, java.lang.String keyAlgorithm)
Constructs a parameter set for HKDFExpandParameterSpec from the given Psuedo Random Key material, the info, output key material length and the Key Algorithm.HKDFExpandParameterSpec(SecretKey prk, byte[] info, long okmLength, java.lang.String keyAlgorithm)
Constructs a parameter set for HKDFExpandParameterSpec from the given Psuedo Random Key, the info, output key material length and the Key Algorithm.
-
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 informationjava.lang.String
getKeyAlgorithm()
Returns the name of the key algorithmlong
getOkmLength()
Returns the length of output Key Materialbyte[]
getPrk()
Returns the Psuedo Random Key material
-
-
-
Constructor Detail
-
HKDFExpandParameterSpec
public HKDFExpandParameterSpec(byte[] prk, byte[] info, long okmLength, java.lang.String keyAlgorithm)
Constructs a parameter set for HKDFExpandParameterSpec from the given Psuedo Random Key material, the info, output key material length and the Key Algorithm. The parameters are copied from the parameters to protect against subsequent modification.- Parameters:
prk
- the Psuedo Random Key material.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 Psuedo Random Key material isnull
-
HKDFExpandParameterSpec
public HKDFExpandParameterSpec(SecretKey prk, byte[] info, long okmLength, java.lang.String keyAlgorithm)
Constructs a parameter set for HKDFExpandParameterSpec from the given Psuedo Random Key, the info, output key material length and the Key Algorithm. The parameters are copied from the parameters to protect against subsequent modification.- Parameters:
prk
- The pseudo random key. Cannot be null.info
- the info that contains optional context and application specific informationn.okmLength
- output key material length.keyAlgorithm
- the name of the algorithm to use when creating SecretKey.- Throws:
java.lang.IllegalArgumentException
- if Psuedo Random Key material isnull
-
-
Method Detail
-
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.
-
getPrk
public byte[] getPrk()
Returns the Psuedo Random Key material- Returns:
- the Psuedo Random Key material
-
getKeyAlgorithm
public java.lang.String getKeyAlgorithm()
Returns the name of the key algorithm- Returns:
- the name of the key algorithm
-
getOkmLength
public long getOkmLength()
Returns the length of output Key Material- Returns:
- the length of output Key Material
-
-