Contents

hkdfDerivedSymmetricKey(using:salt:sharedInfo:outputByteCount:)

Derives a symmetric encryption key from the secret using HKDF key derivation.

Declaration

func hkdfDerivedSymmetricKey<H, Salt, SI>(using hashFunction: H.Type, salt: Salt, sharedInfo: SI, outputByteCount: Int) -> SymmetricKey where H : HashFunction, Salt : DataProtocol, SI : DataProtocol

Parameters

  • hashFunction:

    The hash function to use for key derivation.

  • salt:

    The salt to use for key derivation.

  • sharedInfo:

    The shared information to use for key derivation.

  • outputByteCount:

    The length in bytes of resulting symmetric key.

Return Value

The derived symmetric key.

See Also

Deriving keys