expand(pseudoRandomKey:info:outputByteCount:)
Expands cryptographically strong key material into a derived symmetric key.
Declaration
static func expand<PRK, Info>(pseudoRandomKey prk: PRK, info: Info?, outputByteCount: Int) -> SymmetricKey where PRK : ContiguousBytes, Info : DataProtocolParameters
- 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.
Return Value
The derived symmetric key.
Discussion
Generate cryptographically strong key material to use with this function by calling extract(inputKeyMaterial:salt:).