Botan
1.10.9
|
Functions | |
std::string | decrypt (const byte input[], size_t input_len, const std::string &passphrase) |
std::string | decrypt (const std::string &input, const std::string &passphrase) |
std::string | encrypt (const byte input[], size_t input_len, const std::string &passphrase, RandomNumberGenerator &rng) |
This namespace holds various high-level crypto functions
BOTAN_DLL std::string Botan::CryptoBox::decrypt | ( | const byte | input[], |
size_t | input_len, | ||
const std::string & | passphrase | ||
) |
Decrypt a message encrypted with CryptoBox::encrypt
input | the input data |
input_len | the length of input in bytes |
passphrase | the passphrase used to encrypt the message |
Definition at line 99 of file cryptobox.cpp.
References Botan::OctetString::begin(), Botan::PEM_Code::decode_check_label(), Botan::DECRYPTION, Botan::PKCS5_PBKDF2::derive_key(), Botan::get_byte(), Botan::get_cipher(), Botan::Pipe::process_msg(), Botan::Pipe::read(), Botan::Pipe::read_all_as_string(), Botan::same_mem(), and Botan::MemoryRegion< T >::size().
Referenced by decrypt().
BOTAN_DLL std::string Botan::CryptoBox::decrypt | ( | const std::string & | input, |
const std::string & | passphrase | ||
) |
Decrypt a message encrypted with CryptoBox::encrypt
input | the input data |
passphrase | the passphrase used to encrypt the message |
Definition at line 153 of file cryptobox.cpp.
References decrypt().
BOTAN_DLL std::string Botan::CryptoBox::encrypt | ( | const byte | input[], |
size_t | input_len, | ||
const std::string & | passphrase, | ||
RandomNumberGenerator & | rng | ||
) |
Encrypt a message using a passphrase
input | the input data |
input_len | the length of input in bytes |
passphrase | the passphrase used to encrypt the message |
rng | a ref to a random number generator, such as AutoSeeded_RNG |
Definition at line 43 of file cryptobox.cpp.
References Botan::OctetString::begin(), Botan::copy_mem(), Botan::PKCS5_PBKDF2::derive_key(), Botan::PEM_Code::encode(), Botan::ENCRYPTION, Botan::get_byte(), Botan::get_cipher(), Botan::Pipe::process_msg(), Botan::RandomNumberGenerator::randomize(), Botan::Pipe::read(), Botan::Pipe::remaining(), and Botan::MemoryRegion< T >::size().