KeyWrap
public enum KeyWrap
The Key Wrapping module provides AES Key Wrapping, according to the IETF RFC 3394 specification.
-
Wraps a key with AES wrap (RFC 3394), according to the IETF RFC 3394 specification.
Declaration
Swift
public static func wrap(_ keyToWrap: SymmetricKey, using kek: SymmetricKey) throws -> DataParameters
keyToWrapThe key to wrap
kekThe Key Encryption Key
Return Value
The wrapped key
-
Unwraps a key with AES wrap, according to the IETF RFC 3394 specification.
Declaration
Swift
public static func unwrap<WrappedKey>(_ wrappedKey: WrappedKey, using kek: SymmetricKey) throws -> SymmetricKey where WrappedKey : DataProtocolParameters
wrappedKeyThe wrapped key
kekThe key encryption key
Return Value
The unwrapped key, the method will throw if the payload was incorrectly wrapped.
View on GitHub
Install in Dash
KeyWrap Enumeration Reference