Interface HkdfMacFactory

  • All Known Implementing Classes:
    HkdfMacFactory.Default

    public interface HkdfMacFactory
    Factory class for creating Mac hashers
    • Method Detail

      • createInstance

        Mac createInstance​(SecretKey key)
        Creates a new instance of Hmac with given key, i.e. it must already be initialized with Mac.init(Key).
        Parameters:
        key - the key used, must not be null
        Returns:
        a new mac instance
      • getMacLengthBytes

        int getMacLengthBytes()
        Get the length of the mac output in bytes
        Returns:
        the length of mac output in bytes
      • createSecretKey

        SecretKey createSecretKey​(byte[] rawKeyMaterial)
        Creates a secret key from a byte raw key material to be used with createInstance(SecretKey)
        Parameters:
        rawKeyMaterial - the raw key
        Returns:
        wrapped as secret key instance or null if input is null or empty