expand(pseudoRandomKey:info:outputByteCount:)
Expands cryptographically strong key material into a derived symmetric key.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
static func expand<PRK, Info>(pseudoRandomKey prk: PRK, info: Info?, outputByteCount: Int) -> SymmetricKey where PRK : ContiguousBytes, Info : DataProtocol
Parameters
- prk
A pseudorandom, cryptographically strong key generated from the
extract(inputKeyMaterial:salt:)
function.- info
The shared information to use for key derivation.
- outputByteCount
The length in bytes of the resulting symmetric key.
Returns
The derived symmetric key.
Generate cryptographically strong key material to use with this function by calling extract(inputKeyMaterial:salt:)
.