Botan 3.0.0-alpha0
Crypto and TLS for C&
|
Functions | |
std::string | decrypt (const std::string &input, const std::string &passphrase) |
std::string | decrypt (const uint8_t input[], size_t input_len, const std::string &passphrase) |
secure_vector< uint8_t > | decrypt_bin (const std::string &input, const std::string &passphrase) |
secure_vector< uint8_t > | decrypt_bin (const uint8_t input[], size_t input_len, const std::string &passphrase) |
std::string | encrypt (const uint8_t input[], size_t input_len, const std::string &passphrase, RandomNumberGenerator &rng) |
This namespace holds various high-level crypto functions
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 172 of file cryptobox.cpp.
References Botan::cast_char_ptr_to_uint8(), and decrypt().
std::string Botan::CryptoBox::decrypt | ( | const uint8_t | 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 163 of file cryptobox.cpp.
References Botan::cast_uint8_ptr_to_char(), and decrypt_bin().
Referenced by decrypt(), Botan::PK_Decryptor::decrypt(), Botan::PK_KEM_Decryptor::decrypt(), Botan::Camellia_128::decrypt_n(), Botan::Camellia_192::decrypt_n(), and Botan::Camellia_256::decrypt_n().
secure_vector< uint8_t > Botan::CryptoBox::decrypt_bin | ( | 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 155 of file cryptobox.cpp.
References Botan::cast_char_ptr_to_uint8(), and decrypt_bin().
secure_vector< uint8_t > Botan::CryptoBox::decrypt_bin | ( | const uint8_t | 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 95 of file cryptobox.cpp.
References Botan::constant_time_compare(), Botan::Cipher_Mode::create_or_throw(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::PasswordHashFamily::create_or_throw(), Botan::PEM_Code::decode_check_label(), Botan::DECRYPTION, and Botan::load_be< uint32_t >().
Referenced by decrypt(), and decrypt_bin().
std::string Botan::CryptoBox::encrypt | ( | const uint8_t | 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 40 of file cryptobox.cpp.
References Botan::copy_mem(), Botan::Cipher_Mode::create_or_throw(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::PasswordHashFamily::create_or_throw(), Botan::PEM_Code::encode(), Botan::ENCRYPTION, Botan::RandomNumberGenerator::randomize(), and Botan::store_be().
Referenced by Botan::PK_KEM_Encryptor::encrypt(), Botan::Camellia_128::encrypt_n(), Botan::Camellia_192::encrypt_n(), and Botan::Camellia_256::encrypt_n().