Contents

unwrap(_:using:)

Unwraps a key using the AES wrap algorithm.

Declaration

static func unwrap<WrappedKey>(_ wrappedKey: WrappedKey, using kek: SymmetricKey) throws -> SymmetricKey where WrappedKey : DataProtocol

Parameters

  • wrappedKey:

    The key to unwrap.

  • kek:

    The key encryption key.

Return Value

The unwrapped key.

Discussion

Wrap is an implementation of the AES key wrap algorithm as specified in IETF RFC 3394. The method throws an error is the key was incorrectly wrapped.