Class KdfUtil


  • public class KdfUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      KdfUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] makeKeyBytes​(KEMKDFSpec kdfSpec, byte[] secret)
      Generate a byte[] secret key from the passed in secret.
      • Methods inherited from class java.lang.Object

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

      • KdfUtil

        public KdfUtil()
    • Method Detail

      • makeKeyBytes

        public static byte[] makeKeyBytes​(KEMKDFSpec kdfSpec,
                                          byte[] secret)
        Generate a byte[] secret key from the passed in secret. Note: passed in secret will be erased after use.
        Parameters:
        kdfSpec - definition of the KDF and the output size to produce.
        secret - the secret value to initialize the KDF with (erased after secret key generation).
        Returns:
        a generated secret key.