Generic Instance Method

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

func x963DerivedSymmetricKey<H, SI>(using: H.Type, sharedInfo: SI, outputByteCount: Int) -> SymmetricKey

Derives a symmetric encryption key from the secret using x9.63 key derivation.

struct SymmetricKey

A symmetric cryptographic key.