162 std::unique_ptr<struct SecurityImpl> impl_;
Versatile byte buffer with small-buffer optimisation, ownership semantics and compression.
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
定义 bytes.h:113
void set_callbacks(Callback &&encrypt_callback, Callback &&decrypt_callback)
Installs custom encrypt and decrypt callbacks, bypassing the built-in AES.
Security()
Constructs a Security object with the default AES key and IV.
std::function< bool(const Bytes &in, Bytes &out)> Callback
Callback type for custom encryption or decryption.
定义 security.h:94
bool encrypt(const Bytes &in, Bytes &out)
Encrypts in and writes the ciphertext into out.
bool decrypt(const Bytes &in, Bytes &out)
Decrypts in and writes the plaintext into out.
~Security()
Destroys the Security object and frees the EVP context.
void set_key(const std::string &key)
Sets the AES encryption key.
Platform-independent macro definitions for the VLink library.
#define VLINK_EXPORT
定义 macros.h:85
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
定义 macros.h:184