![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
AES-256-CTR adapter – wraps the low-level AesCtr class behind ICipher. More...
#include <cipher_interface.hpp>
Public Member Functions | |
| AesCtrCipher (const std::vector< uint8_t > &key) | |
| Construct from a key vector (must be 32 bytes for AES-256). | |
| AesCtrCipher (const uint8_t *key, size_t key_len) | |
| Construct from a raw key pointer and length. | |
| expected< std::vector< uint8_t > > | encrypt (const uint8_t *data, size_t size, const std::string &aad="") const override |
| Encrypt data. | |
| expected< std::vector< uint8_t > > | decrypt (const uint8_t *data, size_t size, const std::string &aad="") const override |
| Decrypt data produced by encrypt(). | |
| ~AesCtrCipher () override | |
| Destructor: securely zeroes key material (CWE-244: heap inspection). | |
| bool | is_authenticated () const noexcept override |
| size_t | key_size () const noexcept override |
| std::string_view | algorithm_name () const noexcept override |
Public Member Functions inherited from signet::forge::crypto::ICipher | |
| virtual | ~ICipher ()=default |
| ICipher ()=default | |
| ICipher (const ICipher &)=delete | |
| ICipher & | operator= (const ICipher &)=delete |
| ICipher (ICipher &&)=default | |
| ICipher & | operator= (ICipher &&)=default |
Static Public Attributes | |
| static constexpr uint8_t | AAD_TAGGED_IV_FLAG = 0x80u |
| static constexpr size_t | AAD_TAG_SIZE = 32u |
AES-256-CTR adapter – wraps the low-level AesCtr class behind ICipher.
Unauthenticated encryption (the AAD parameter is ignored). Generates a random 16-byte IV per encrypt() call and prepends it to the output.
Definition at line 526 of file cipher_interface.hpp.
|
inlineexplicit |
Construct from a key vector (must be 32 bytes for AES-256).
Definition at line 532 of file cipher_interface.hpp.
|
inlineexplicit |
Construct from a raw key pointer and length.
Definition at line 539 of file cipher_interface.hpp.
|
inlineoverride |
Destructor: securely zeroes key material (CWE-244: heap inspection).
Uses volatile write + compiler barrier to prevent dead-store elimination.
Definition at line 634 of file cipher_interface.hpp.
|
inlineoverridevirtualnoexcept |
Implements signet::forge::crypto::ICipher.
Definition at line 647 of file cipher_interface.hpp.
|
inlineoverridevirtual |
Decrypt data produced by encrypt().
Implements signet::forge::crypto::ICipher.
Definition at line 575 of file cipher_interface.hpp.
|
inlineoverridevirtual |
Encrypt data.
For authenticated ciphers, aad is bound into the tag. For unauthenticated ciphers, aad is ignored. Returns: [iv_size(1)] [iv] [ciphertext] [tag if authenticated]
Implements signet::forge::crypto::ICipher.
Definition at line 545 of file cipher_interface.hpp.
|
inlineoverridevirtualnoexcept |
Implements signet::forge::crypto::ICipher.
Definition at line 643 of file cipher_interface.hpp.
|
inlineoverridevirtualnoexcept |
Implements signet::forge::crypto::ICipher.
Definition at line 645 of file cipher_interface.hpp.
|
staticconstexpr |
Definition at line 529 of file cipher_interface.hpp.
|
staticconstexpr |
Definition at line 528 of file cipher_interface.hpp.