Botan

Cryptobox Message Routines

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

struct  CryptoBox;

This namespace holds various high-level crypto functions


static Vector!ubyte  encrypt(const(ubyte)* input, size_t input_len, in SymmetricKey master_key, RandomNumberGenerator rng);

Encrypt a message using a shared secret key

Parameters
const(ubyte)* input the input data
size_t input_len the length of input in bytes
SymmetricKey master_key the key used to  encrypt the message
RandomNumberGenerator rng a ref to a random number generator, such as AutoSeededRNG

static SecureVector!ubyte  decrypt(const(ubyte)* input, size_t input_len, in SymmetricKey master_key);

Encrypt a message using a shared secret key

Parameters
const(ubyte)* input the input data
size_t input_len the length of input in bytes
SymmetricKey master_key the key used to encrypt the message