Botan 3.9.0
Crypto and TLS for C&
|
Namespaces | |
namespace | BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS |
Functions | |
std::string | decrypt (const uint8_t input[], size_t input_len, std::string_view passphrase) |
std::string | decrypt (std::string_view input, std::string_view passphrase) |
secure_vector< uint8_t > | decrypt_bin (const uint8_t input[], size_t input_len, std::string_view passphrase) |
secure_vector< uint8_t > | decrypt_bin (std::string_view input, std::string_view passphrase) |
std::string | encrypt (const uint8_t input[], size_t input_len, std::string_view passphrase, RandomNumberGenerator &rng) |
This namespace holds various high-level crypto functions
std::string Botan::CryptoBox::decrypt | ( | const uint8_t | input[], |
size_t | input_len, | ||
std::string_view | 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 168 of file cryptobox.cpp.
References Botan::bytes_to_string(), and decrypt_bin().
Referenced by Botan::CryptoBox::BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS::decrypt(), and decrypt().
std::string Botan::CryptoBox::decrypt | ( | std::string_view | input, |
std::string_view | 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::as_span_of_bytes(), and decrypt().
secure_vector< uint8_t > Botan::CryptoBox::decrypt_bin | ( | const uint8_t | input[], |
size_t | input_len, | ||
std::string_view | 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 96 of file cryptobox.cpp.
References Botan::Cipher_Mode::create_or_throw(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::PasswordHashFamily::create_or_throw(), Botan::PEM_Code::decode_check_label(), Botan::Decryption, Botan::CT::is_equal(), and Botan::load_be().
Referenced by decrypt(), Botan::CryptoBox::BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS::decrypt_bin(), and decrypt_bin().
secure_vector< uint8_t > Botan::CryptoBox::decrypt_bin | ( | std::string_view | input, |
std::string_view | passphrase ) |
Decrypt a message encrypted with CryptoBox::encrypt
input | the input data |
passphrase | the passphrase used to encrypt the message |
Definition at line 164 of file cryptobox.cpp.
References Botan::as_span_of_bytes(), and decrypt_bin().
std::string Botan::CryptoBox::encrypt | ( | const uint8_t | input[], |
size_t | input_len, | ||
std::string_view | 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 42 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().