VLink  2.0.0
A high-performance communication middleware
vlink::Security::Config Struct Referencefinal

Aggregate of every parameter accepted by the Security constructor. More...

#include <security.h>

Collaboration diagram for vlink::Security::Config:

Classes

struct  Advanced
 Low-frequency policy knobs and sender-authentication keys. More...
 

Public Member Functions

 Config ()=default
 

Public Attributes

std::string key
 Raw symmetric seed; SHA-256 truncated to 16 bytes. More...
 
std::string passphrase
 Low-entropy passphrase consumed by PBKDF2-HMAC-SHA256. More...
 
Bytes pbkdf2_salt
 Per-deployment salt (>=16 bytes) shared out of band. More...
 
uint32_t pbkdf2_iterations {200000U}
 PBKDF2 iteration count, tune for target hardware. More...
 
std::string public_key_pem
 Peer's RSA public key (PEM) for RSA-OAEP outbound wrap. More...
 
std::string private_key_pem
 Local RSA private key (PEM) for RSA-OAEP inbound unwrap. More...
 
Callback encrypt_callback
 Custom encrypt; bypasses the built-in AEAD pipeline. More...
 
Callback decrypt_callback
 Custom decrypt; must accompany encrypt_callback. More...
 
Advanced advanced
 AAD, replay window, and signing / verifying PEM material. More...
 

Detailed Description

Aggregate of every parameter accepted by the Security constructor.

Fields are processed independently. Empty strings, empty Bytes, and null callbacks mean "leave this slot blank"; non-empty values are validated by the constructor and installed on success or logged-and-ignored on failure. When every cryptographic field is empty and VLINK_ENABLE_SECURITY is defined, the constructor falls back to the built-in default symmetric slot, which is intended for development only.

Precedence rules
  • When both callbacks are present, the built-in path is bypassed for both directions.
  • Outbound: public_key_pem (if installed) -> key / passphrase -> default slot.
  • Inbound : private_key_pem (if installed) -> key / passphrase -> default slot.

Constructor & Destructor Documentation

◆ Config()

vlink::Security::Config::Config ( )
default

Member Data Documentation

◆ advanced

Advanced vlink::Security::Config::advanced

AAD, replay window, and signing / verifying PEM material.

◆ decrypt_callback

Callback vlink::Security::Config::decrypt_callback

Custom decrypt; must accompany encrypt_callback.

◆ encrypt_callback

Callback vlink::Security::Config::encrypt_callback

Custom encrypt; bypasses the built-in AEAD pipeline.

◆ key

std::string vlink::Security::Config::key

Raw symmetric seed; SHA-256 truncated to 16 bytes.

◆ passphrase

std::string vlink::Security::Config::passphrase

Low-entropy passphrase consumed by PBKDF2-HMAC-SHA256.

◆ pbkdf2_iterations

uint32_t vlink::Security::Config::pbkdf2_iterations {200000U}

PBKDF2 iteration count, tune for target hardware.

◆ pbkdf2_salt

Bytes vlink::Security::Config::pbkdf2_salt

Per-deployment salt (>=16 bytes) shared out of band.

◆ private_key_pem

std::string vlink::Security::Config::private_key_pem

Local RSA private key (PEM) for RSA-OAEP inbound unwrap.

◆ public_key_pem

std::string vlink::Security::Config::public_key_pem

Peer's RSA public key (PEM) for RSA-OAEP outbound wrap.


The documentation for this struct was generated from the following file: