extract(inputKeyMaterial:salt:)
Creates cryptographically strong key material from a main key or passcode that you specify.
Declaration
static func extract<Salt>(inputKeyMaterial: SymmetricKey, salt: Salt?) -> HashedAuthenticationCode<H> where Salt : DataProtocolParameters
- inputKeyMaterial:
The main key or passcode the derivation function uses to derive a key.
- salt:
The salt to use for key derivation.
Return Value
A pseudorandom, cryptographically strong key in the form of a hashed authentication code.
Discussion
Generate a derived symmetric key from the cryptographically strong key material this function creates by calling expand(pseudoRandomKey:info:outputByteCount:).