![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Abstract cipher interface — unified API for authenticated (GCM) and unauthenticated (CTR) encryption. More...
#include <cipher_interface.hpp>
Public Member Functions | |
| virtual | ~ICipher ()=default |
| virtual expected< std::vector< uint8_t > > | encrypt (const uint8_t *data, size_t size, const std::string &aad="") const =0 |
| Encrypt data. | |
| virtual expected< std::vector< uint8_t > > | decrypt (const uint8_t *data, size_t size, const std::string &aad="") const =0 |
| Decrypt data produced by encrypt(). | |
| virtual bool | is_authenticated () const noexcept=0 |
| Whether this cipher provides authentication (GCM=true, CTR=false). | |
| virtual size_t | key_size () const noexcept=0 |
| Key size in bytes (32 for AES-256). | |
| virtual std::string_view | algorithm_name () const noexcept=0 |
| Human-readable algorithm name. | |
| ICipher ()=default | |
| ICipher (const ICipher &)=delete | |
| ICipher & | operator= (const ICipher &)=delete |
| ICipher (ICipher &&)=default | |
| ICipher & | operator= (ICipher &&)=default |
Abstract cipher interface — unified API for authenticated (GCM) and unauthenticated (CTR) encryption.
Implementations are move-only (hold key material).
Definition at line 64 of file cipher_interface.hpp.
|
virtualdefault |
|
default |
|
delete |
|
default |
|
pure virtualnoexcept |
Human-readable algorithm name.
Implemented in signet::forge::crypto::AesGcmCipher, and signet::forge::crypto::AesCtrCipher.
|
pure virtual |
Decrypt data produced by encrypt().
Implemented in signet::forge::crypto::AesGcmCipher, and signet::forge::crypto::AesCtrCipher.
|
pure virtual |
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]
Implemented in signet::forge::crypto::AesGcmCipher, and signet::forge::crypto::AesCtrCipher.
|
pure virtualnoexcept |
Whether this cipher provides authentication (GCM=true, CTR=false).
Implemented in signet::forge::crypto::AesGcmCipher, and signet::forge::crypto::AesCtrCipher.
|
pure virtualnoexcept |
Key size in bytes (32 for AES-256).
Implemented in signet::forge::crypto::AesGcmCipher, and signet::forge::crypto::AesCtrCipher.