VLink  2.0.0
A high-performance communication middleware
vlink::Security::Config结构体 参考final

Aggregate of every parameter accepted by the Security constructor. 更多...

#include <security.h>

vlink::Security::Config 的协作图:

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

Public 成员函数

 Config ()=default
 

Public 属性

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

详细描述

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.

构造及析构函数说明

◆ Config()

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

类成员变量说明

◆ 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.


该结构体的文档由以下文件生成: