Contents

deriveKey(inputKeyMaterial:salt:info:output:)

Derives a symmetric encryption key from a main key or passcode using HKDF key derivation with information and salt you specify.

Declaration

static func deriveKey(inputKeyMaterial: SymmetricKey, salt: RawSpan? = nil, info: RawSpan? = nil, output outputKey: inout OutputRawSpan)

Parameters

  • inputKeyMaterial:

    The main key or passcode the derivation function uses to derive a key.

  • salt:

    The salt to use for key derivation.

  • info:

    The shared information to use for key derivation.

  • outputKey:

    An output span that will be populated with the derived symmetric key.