Botan

AES Key Wrap (RFC 3394)

License
Botan is released under the Simplified BSD License (see LICENSE.md)

SecureVector!ubyte  rfc3394Keywrap()(auto ref const SecureVector!ubyte key, in SymmetricKey kek, AlgorithmFactory af);

Encrypt a key under a key encryption key using the algorithm described in RFC 3394

Parameters
SecureVector!ubyte key the plaintext key to encrypt
SymmetricKey kek the key encryption key
AlgorithmFactory af an algorithm factory
Returns
key encrypted under kek

SecureVector!ubyte  rfc3394Keyunwrap()(auto ref const SecureVector!ubyte key, in SymmetricKey kek, AlgorithmFactory af);

Decrypt a key under a key encryption key using the algorithm described in RFC 3394

Parameters
SecureVector!ubyte key the encrypted key to decrypt
SymmetricKey kek the key encryption key
AlgorithmFactory af an algorithm factory
Returns
key decrypted under kek