One Logo Pool Ball
CryptoKit · IOS API REFERENCE

HKDF

struct · iOS 14.0+ · SDK 27.1

struct HKDF<H> where H : HashFunction

A standards-based implementation of an HMAC-based Key Derivation Function (HKDF). The key derivation functions allow you to derive one or more secrets of the size of your choice from a main key or passcode. The key derivation function is compliant with IETF RFC 5869. Use one of the `deriveKey` functions, such as ``deriveKey(inputKeyMaterial:outputByteCount:)`` or ``deriveKey(inputKeyMaterial:salt:info:outputByteCount:)``, to derive a key from a main secret or passcode in a single function. To derive a key with more fine-grained control, use ``extract(inputKeyMaterial:salt:)`` to create cryptographically strong key material in the form of a hashed authentication code, then call ``expand(pseudoRandomKey:info:outputByteCount:)`` using that key material to generate a symmetric key of the length you specify.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

9 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HKDF.deriveKey(inputKeyMaterial:salt:info:output:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.deriveKey(inputKeyMaterial:salt:info:outputByteCount:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.deriveKey(inputKeyMaterial:info:outputByteCount:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.deriveKey(inputKeyMaterial:salt:outputByteCount:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.deriveKey(inputKeyMaterial:outputByteCount:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.extract(inputKeyMaterial:salt:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.extract(inputKeyMaterial:salt:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.expand(pseudoRandomKey:info:outputByteCount:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

HKDF.expand(pseudoRandomKey:info:into:)

The containing type needs Swift generic type arguments. (no canonical witness for H)

All CryptoKit types →