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 string  encrypt(const(ubyte)* input, size_t input_len, in string passphrase, RandomNumberGenerator rng);

Encrypt a message using a passphrase

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

static string  decrypt(const(ubyte)* input, size_t input_len, in string passphrase);

Decrypt a message encrypted with CryptoBox::encrypt

Parameters
const(ubyte)* input the input data
size_t input_len the length of input in bytes
string passphrase the passphrase used to encrypt the message

static string  decrypt(in string input, in string passphrase);

Decrypt a message encrypted with CryptoBox::encrypt

Parameters
string input the input data
string passphrase the passphrase used to encrypt the message