AES-ECB cipher helper used by pairing and stream encryption code.
More...
#include <src/crypto.h>
|
| int | decrypt (const std::string_view &cipher, std::vector< std::uint8_t > &plaintext) |
| | Decrypt ciphertext into the supplied plaintext buffer.
|
| | ecb_t (const aes_t &key_material, bool use_padding=true) |
| | Explicitly construct an AES-ECB cipher helper with key material.
|
|
| ecb_t (ecb_t &&) noexcept=default |
| | Construct an AES-ECB cipher helper with key material.
|
| int | encrypt (const std::string_view &plaintext, std::vector< std::uint8_t > &cipher) |
| | Encrypt plaintext into the supplied ciphertext buffer.
|
| ecb_t & | operator= (ecb_t &&) noexcept=default |
| | Assign state from another instance while preserving ownership semantics.
|
|
|
cipher_ctx_t | decrypt_ctx |
| | Decrypt ctx.
|
|
cipher_ctx_t | encrypt_ctx |
| | Encrypt ctx.
|
|
aes_t | key |
| | AES key used by the cipher context.
|
|
bool | padding |
| | Enables block padding for the cipher.
|
AES-ECB cipher helper used by pairing and stream encryption code.
◆ ecb_t()
| crypto::cipher::ecb_t::ecb_t |
( |
const aes_t & | key_material, |
|
|
bool | use_padding = true ) |
|
explicit |
Explicitly construct an AES-ECB cipher helper with key material.
- Parameters
-
| key_material | AES key material used to initialize the cipher. |
| use_padding | Whether the cipher should use block padding. |
◆ decrypt()
| int crypto::cipher::ecb_t::decrypt |
( |
const std::string_view & | cipher, |
|
|
std::vector< std::uint8_t > & | plaintext ) |
Decrypt ciphertext into the supplied plaintext buffer.
- Parameters
-
| cipher | Ciphertext bytes to decrypt or output buffer for encryption. |
| plaintext | Plaintext bytes to encrypt. |
- Returns
- Number of bytes written, signature bytes, or an error status depending on the overload.
◆ encrypt()
| int crypto::cipher::ecb_t::encrypt |
( |
const std::string_view & | plaintext, |
|
|
std::vector< std::uint8_t > & | cipher ) |
Encrypt plaintext into the supplied ciphertext buffer.
- Parameters
-
| plaintext | Plaintext bytes to encrypt. |
| cipher | Ciphertext bytes to decrypt or output buffer for encryption. |
- Returns
- Number of bytes written, signature bytes, or an error status depending on the overload.
◆ operator=()
| ecb_t & crypto::cipher::ecb_t::operator= |
( |
ecb_t && | | ) |
|
|
defaultnoexcept |
Assign state from another instance while preserving ownership semantics.
- Returns
- Reference or value produced by the operator.
The documentation for this class was generated from the following files: