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.AlgorithmParameterSpec
    This 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 information
      byte[] getInKeyMaterial()
      Returns the input key material
      java.lang.String getKeyAlgorithm()
      Returns the name of the key algorithm
      long getOkmLength()
      Returns the length of output Key Material
      byte[] getSalt()
      Returns the salt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 is null.
      • 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 is null.
    • 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.

© Portions Copyright 2003, 2023 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2023 Oracle and/or its affiliates. All rights reserved.