Contents

deriveKey(inputKeyMaterial:salt:outputByteCount:)

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

Declaration

static func deriveKey<Salt>(inputKeyMaterial: SymmetricKey, salt: Salt, outputByteCount: Int) -> SymmetricKey where Salt : DataProtocol

Parameters

  • inputKeyMaterial:

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

  • salt:

    The salt to use for key derivation.

  • outputByteCount:

    The length in bytes of the resulting symmetric key.

Return Value

The derived symmetric key.

See Also

Deriving a key