Class HKDFParams

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HKDFParams.Builder
      This class is used to create HKDF configuration parameters HKDFParams.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String hmacHashAlgorithm  
      private byte[] info  
      private byte[] salt  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected HKDFParams​(int keyBitLength, java.lang.String hmacHashAlgorithm)
      Constructor HKDFParams with specified digest algorithm.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static HKDFParams.Builder createBuilder​(int keyBitLength, java.lang.String hmacHashAlgorithm)
      Method create a new builder for the HKDFParams.
      java.lang.String getHmacHashAlgorithm()
      Method return the digest algorithm URI.
      byte[] getInfo()
      Method return the info value which is used for the key derivation.
      byte[] getSalt()
      Method return the salt value which is used for the key derivation.
      void setHmacHashAlgorithm​(java.lang.String hmacHashAlgorithm)
      Method set the digest algorithm URI.
      void setInfo​(byte[] info)
      Method set the info value which is used for the key derivation.
      void setSalt​(byte[] salt)
      Method set the salt value which is used for the key derivation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hmacHashAlgorithm

        private java.lang.String hmacHashAlgorithm
      • salt

        private byte[] salt
      • info

        private byte[] info
    • Constructor Detail

      • HKDFParams

        protected HKDFParams​(int keyBitLength,
                             java.lang.String hmacHashAlgorithm)
        Constructor HKDFParams with specified digest algorithm.
        Parameters:
        keyBitLength - the length of the derived key in bits
        hmacHashAlgorithm - the HMAC hash algorithm to use for the key derivation
    • Method Detail

      • getHmacHashAlgorithm

        public java.lang.String getHmacHashAlgorithm()
        Method return the digest algorithm URI. In case of algorithm is not set, the "default" algorithm http://www.w3.org/2001/04/xmldsig-more#hmac-sha256 URI algorithm is returned.
        Returns:
        the hmac algorithm
      • setHmacHashAlgorithm

        public void setHmacHashAlgorithm​(java.lang.String hmacHashAlgorithm)
        Method set the digest algorithm URI.
        Parameters:
        hmacHashAlgorithm - the hmac algorithm URI
      • getSalt

        public byte[] getSalt()
        Method return the salt value which is used for the key derivation.
        Returns:
        the salt value
      • setSalt

        public void setSalt​(byte[] salt)
        Method set the salt value which is used for the key derivation.
        Parameters:
        salt -
      • getInfo

        public byte[] getInfo()
        Method return the info value which is used for the key derivation.
        Returns:
        the info value
      • setInfo

        public void setInfo​(byte[] info)
        Method set the info value which is used for the key derivation.
        Parameters:
        info -
      • createBuilder

        public static HKDFParams.Builder createBuilder​(int keyBitLength,
                                                       java.lang.String hmacHashAlgorithm)
        Method create a new builder for the HKDFParams.
        Parameters:
        keyBitLength - the length of the derived key in bits
        hmacHashAlgorithm - the HMAC hash algorithm URI to use for the key derivation
        Returns:
        a new builder instance