One Logo Pool Ball
CryptoKit · IOS API REFERENCE

AES.KeyWrap

enum · iOS 15.0+ · SDK 27.1

enum KeyWrap

An implementation of AES Key Wrapping in accordance with the IETF RFC 3394 specification.

Members (2)

static · iOS 15.0+

wrap

TypeScript
static wrap(keyToWrap: SymmetricKey, kek: SymmetricKey): ArrayBuffer
Swift declaration
static func wrap(_ keyToWrap: SymmetricKey, using kek: SymmetricKey) throws -> Data

Wraps a key using the AES wrap algorithm. Wrap is an implementation of the AES key wrap algorithm as specified in IETF RFC 3394. - Parameters: - keyToWrap: The key to wrap. - kek: The key encryption key. - Returns: The wrapped key.

static · iOS 15.0+

unwrap

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

Unwraps a key using the AES wrap algorithm. 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. - Parameters: - wrappedKey: The key to unwrap. - kek: The key encryption key. - Returns: The unwrapped key.

Skipped declarations

No declarations were skipped in this snapshot.

All CryptoKit types →