java.lang.Object
org.apache.xml.security.encryption.params.HKDFParams.Builder
Enclosing class:
HKDFParams

public static class HKDFParams.Builder extends Object
This class is used to create HKDF configuration parameters HKDFParams. The key length and HMAC hash algorithm are required parameters.
  • Constructor Details

    • Builder

      protected Builder(int keyBitLength, String hmacHashAlgorithm)
      Constructor for the HKDFParams builder. The key bit length and HMAC hash algorithm are required parameters.
      Parameters:
      keyBitLength - the length of the derived key in bits
      hmacHashAlgorithm - the HMAC hash algorithm URI to use for the key derivation
  • Method Details

    • salt

      public HKDFParams.Builder salt(byte[] salt)
      Set the (optional) salt value which is used for the key derivation.
      Parameters:
      salt - the hkdf salt value
      Returns:
      the self updated builder instance
    • info

      public HKDFParams.Builder info(byte[] info)
      Set the (optional) info value which is used for the key derivation.
      Parameters:
      info - the hkdf info value
      Returns:
      the self updated builder instance
    • build

      public HKDFParams build()
      Build the HKDFParams instance with the configured parameters.
      Returns:
      the configured HKDFParams instance