|
VLink
2.0.0
A high-performance communication middleware
|
Configuration aggregate for vlink_security_create() and the vlink_create_secure_*() entry points.
更多...
#include <c_api.h>
Public 属性 | |
| const char * | key |
| const char * | passphrase |
| const uint8_t * | pbkdf2_salt |
| size_t | pbkdf2_salt_size |
| uint32_t | pbkdf2_iterations |
| const char * | public_key_pem |
| const char * | private_key_pem |
| vlink_security_callback_t | encrypt_callback |
| vlink_security_callback_t | decrypt_callback |
| void * | callback_user_data |
| vlink_security_advanced_config_t | advanced |
Configuration aggregate for vlink_security_create() and the vlink_create_secure_*() entry points.
Each field maps onto the field of the same name on vlink::Security::Config. String fields are null-terminated; NULL or empty strings disable the matching explicit field. When every explicit cryptographic field is empty, the configuration maps to the built-in default symmetric slot, provided built-in algorithms are enabled. A zero-initialised aggregate leaves advanced.replay_window at 0, so replay checks are disabled until the caller sets the field or calls vlink_security_config_init(). pbkdf2_salt is a raw byte buffer of pbkdf2_salt_size bytes; pass NULL / 0 to leave it empty. Setting pbkdf2_iterations to 0 selects the default (200000).
encrypt_callback and decrypt_callback are non-NULL the custom-callback path overrides every other slot.public_key_pem / private_key_pem are installed the RSA hybrid path drives outbound / inbound messages.key, passphrase + pbkdf2_salt, or the built-in default.key / passphrase are the symmetric key sources. advanced holds low-frequency options such as AAD, replay protection, and signing. | vlink_security_advanced_config_t vlink_security_config_s::advanced |
Low-frequency security options.
| void* vlink_security_config_s::callback_user_data |
Opaque pointer forwarded to both callbacks.
| vlink_security_callback_t vlink_security_config_s::decrypt_callback |
Custom decrypt callback, or NULL.
| vlink_security_callback_t vlink_security_config_s::encrypt_callback |
Custom encrypt callback, or NULL.
| const char* vlink_security_config_s::key |
Raw symmetric seed (SHA-256 truncated), or NULL.
| const char* vlink_security_config_s::passphrase |
Low-entropy passphrase fed into PBKDF2-HMAC-SHA256, or NULL.
| uint32_t vlink_security_config_s::pbkdf2_iterations |
PBKDF2 iteration count; 0 means default (200000).
| const uint8_t* vlink_security_config_s::pbkdf2_salt |
PBKDF2 salt (>=16 bytes), or NULL.
| size_t vlink_security_config_s::pbkdf2_salt_size |
Byte count of pbkdf2_salt.
| const char* vlink_security_config_s::private_key_pem |
Local RSA private key (PEM) for inbound decryption, or NULL.
| const char* vlink_security_config_s::public_key_pem |
Peer RSA public key (PEM) for outbound encryption, or NULL.