Skip to main content

Module crypto

Module crypto 

Source
Expand description

§VCL Cryptographic Primitives

Low-level cryptographic helpers used internally by VCLConnection:

Structs§

KeyPair
An Ed25519 key pair used for signing and verifying VCLPacket signatures.

Functions§

decrypt_payload
Decrypt ciphertext with XChaCha20-Poly1305 using the given key and nonce.
encrypt_payload
Encrypt data with XChaCha20-Poly1305 using the given 32-byte key.
hash_data
Compute a SHA-256 hash of data. Returns a 32-byte Vec<u8>.