Class KeyDerivationParameters

  • Direct Known Subclasses:
    ConcatKDFParams, HKDFParams

    public abstract class KeyDerivationParameters
    extends java.lang.Object
    Abstract key derivation class contains the basic parameters used for the key derivation. The class should be extended to provide algorithm specific parameters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String algorithm  
      private int keyBitLength  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected KeyDerivationParameters​(java.lang.String algorithm, int keyLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()  
      int getKeyBitLength()
      The length of the derived key in bits.
      int getKeyLength()
      The length of the derived key in bytes needed to store the key in bitSize.
      • Methods inherited from class java.lang.Object

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

      • algorithm

        private final java.lang.String algorithm
      • keyBitLength

        private final int keyBitLength
    • Constructor Detail

      • KeyDerivationParameters

        protected KeyDerivationParameters​(java.lang.String algorithm,
                                          int keyLength)
    • Method Detail

      • getAlgorithm

        public java.lang.String getAlgorithm()
      • getKeyBitLength

        public int getKeyBitLength()
        The length of the derived key in bits.
        Returns:
      • getKeyLength

        public int getKeyLength()
        The length of the derived key in bytes needed to store the key in bitSize. For example: if the key is 9 bits long, the length of the key in bytes is 2, but the key is stored in 8 bits the length in bytes is 1.
        Returns:
        the length of the derived key in bytes