Expand description
§voided-core
Core cryptographic primitives for the Voided encryption library.
This crate provides the source-of-truth implementation for all crypto operations, ensuring identical behavior across Node.js (native binding) and browser (WASM) targets.
§Features
backend- Full feature set for Node.js backend (default)browser- Browser-compatible subset for WASMcompression- Brotli and Gzip compressionsigning- Digital signatures (Ed25519, ECDSA, RSA-PSS)obfuscation- Map-based character obfuscation
§Example
use voided_core::encryption;
// Generate a key
let key = encryption::generate_key();
// Encrypt some data
let plaintext = b"Hello, World!";
let encrypted = encryption::encrypt(plaintext, &key, None).unwrap();
// Decrypt it back
let decrypted = encryption::decrypt(&encrypted, &key).unwrap();
assert_eq!(plaintext, &decrypted[..]);Re-exports§
pub use signing::generate_ed25519_key_pair;pub use signing::sign_ed25519;pub use signing::verify_ed25519;
Modules§
- compression
- Compression module providing Brotli and Gzip compression.
- encryption
- Encryption module providing AEAD encryption primitives.
- formats
- Wire format utilities for serialization and deserialization.
- hash
- Hashing module providing SHA-256, SHA-512, HMAC, and PBKDF2.
- obfuscation
- Obfuscation module providing map-based character substitution.
- signing
- Digital signature module providing Ed25519, ECDSA, and RSA-PSS.
- util
- Utility functions and helpers.
Enums§
- Error
- Errors that can occur during cryptographic operations
Constants§
- FORMAT_
VERSION - Wire format version
- MAGIC_
COMPRESSED - Magic bytes for compression header
- MAGIC_
ENCRYPTED - Magic bytes for encrypted payloads
- MAGIC_
MAP - Magic bytes for obfuscation maps
- MAGIC_
SIGNATURE - Magic bytes for signatures
- VERSION
- Library version
Type Aliases§
- Result
- Result type alias for voided-core operations