deriveKey(inputKeyMaterial:outputByteCount:)
Derives a symmetric encryption key from a main key or passcode using HKDF key derivation.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
static func deriveKey(inputKeyMaterial: SymmetricKey, outputByteCount: Int) -> SymmetricKey
Parameters
- inputKeyMaterial
The main key or passcode the derivation function uses to derive a key.
- outputByteCount
The length in bytes of the resulting symmetric key.
Returns
The derived symmetric key.