1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! # 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 WASM
//! - `compression` - Brotli and Gzip compression
//! - `signing` - Digital signatures (Ed25519, ECDSA, RSA-PSS)
//! - `obfuscation` - Map-based character obfuscation
//!
//! ## Example
//!
//! ```rust
//! 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[..]);
//! ```
extern crate alloc;
pub use ;
/// Library version
pub const VERSION: &str = env!;
/// Wire format version
pub const FORMAT_VERSION: u8 = 0x01;
/// Magic bytes for encrypted payloads
pub const MAGIC_ENCRYPTED: & = b"VOI1";
/// Magic bytes for obfuscation maps
pub const MAGIC_MAP: & = b"VOIM";
/// Magic bytes for signatures
pub const MAGIC_SIGNATURE: & = b"VOIS";
/// Magic bytes for compression header
pub const MAGIC_COMPRESSED: & = b"VC";