#include <cipheraead.hpp>
|
| | OPENVPN_EXCEPTION (mbedtls_aead_error) |
| |
| | CipherContextAEAD ()=default |
| |
| | ~CipherContextAEAD () |
| |
| | CipherContextAEAD (CipherContextAEAD &&other) noexcept |
| |
| CipherContextAEAD & | operator= (CipherContextAEAD &&other) |
| |
| void | init (SSLLib::Ctx libctx, const CryptoAlgs::Type alg, const unsigned char *key, const unsigned int keysize, const int mode) |
| |
| void | encrypt (const unsigned char *input, unsigned char *output, size_t length, const unsigned char *iv, unsigned char *tag, const unsigned char *ad, size_t ad_len) |
| |
| const Crypto::AEADUsageLimit & | get_usage_limit () |
| |
| bool | decrypt (const unsigned char *input, unsigned char *output, size_t length, const unsigned char *iv, const unsigned char *tag, const unsigned char *ad, size_t ad_len) |
| |
| bool | is_initialized () const |
| |
| | OPENVPN_SIMPLE_EXCEPTION (mbedtls_cipher_mode_error) |
| |
| | OPENVPN_SIMPLE_EXCEPTION (mbedtls_cipher_uninitialized) |
| |
| bool constexpr | requires_authtag_at_end () |
| |
Definition at line 29 of file cipheraead.hpp.
◆ anonymous enum
◆ CipherContextAEAD() [1/2]
| openvpn::MbedTLSCrypto::CipherContextAEAD::CipherContextAEAD |
( |
| ) |
|
|
default |
◆ ~CipherContextAEAD()
| openvpn::MbedTLSCrypto::CipherContextAEAD::~CipherContextAEAD |
( |
| ) |
|
|
inline |
◆ CipherContextAEAD() [2/2]
| openvpn::MbedTLSCrypto::CipherContextAEAD::CipherContextAEAD |
( |
CipherContextAEAD && |
other | ) |
|
|
inlinenoexcept |
◆ cipher_type()
| static mbedtls_cipher_type_t openvpn::MbedTLSCrypto::CipherContextAEAD::cipher_type |
( |
const CryptoAlgs::Type |
alg, |
|
|
unsigned int & |
keysize |
|
) |
| |
|
inlinestaticprivate |
◆ decrypt()
| bool openvpn::MbedTLSCrypto::CipherContextAEAD::decrypt |
( |
const unsigned char * |
input, |
|
|
unsigned char * |
output, |
|
|
size_t |
length, |
|
|
const unsigned char * |
iv, |
|
|
const unsigned char * |
tag, |
|
|
const unsigned char * |
ad, |
|
|
size_t |
ad_len |
|
) |
| |
|
inline |
Decrypts AEAD encrypted data. Note that this method ignores the tag parameter and the tag is assumed to be part of input and at the end of the input.
- Parameters
-
| input | Input data to decrypt |
| output | Where decrypted data will be written to |
| iv | IV of the encrypted data. |
| length | length the of the data, this includes the tag at the end. |
| ad | start of the additional data |
| ad_len | length of the additional data |
| tag | ignored by the mbed TLS variant of the method. (see OpenSSL variant of the method for more details). |
input and output may NOT be equal
Definition at line 153 of file cipheraead.hpp.
◆ encrypt()
| void openvpn::MbedTLSCrypto::CipherContextAEAD::encrypt |
( |
const unsigned char * |
input, |
|
|
unsigned char * |
output, |
|
|
size_t |
length, |
|
|
const unsigned char * |
iv, |
|
|
unsigned char * |
tag, |
|
|
const unsigned char * |
ad, |
|
|
size_t |
ad_len |
|
) |
| |
|
inline |
◆ get_usage_limit()
Returns the AEAD usage limit associated with this AEAD cipher instance to check the limits
Definition at line 134 of file cipheraead.hpp.
◆ init()
| void openvpn::MbedTLSCrypto::CipherContextAEAD::init |
( |
SSLLib::Ctx |
libctx, |
|
|
const CryptoAlgs::Type |
alg, |
|
|
const unsigned char * |
key, |
|
|
const unsigned int |
keysize, |
|
|
const int |
mode |
|
) |
| |
|
inline |
◆ is_initialized()
| bool openvpn::MbedTLSCrypto::CipherContextAEAD::is_initialized |
( |
| ) |
const |
|
inline |
◆ is_supported()
| static bool openvpn::MbedTLSCrypto::CipherContextAEAD::is_supported |
( |
void * |
libctx, |
|
|
const CryptoAlgs::Type |
alg |
|
) |
| |
|
inlinestatic |
◆ OPENVPN_EXCEPTION()
| openvpn::MbedTLSCrypto::CipherContextAEAD::OPENVPN_EXCEPTION |
( |
mbedtls_aead_error |
| ) |
|
◆ operator=()
◆ aead_usage_limit_
The documentation for this class was generated from the following file: