| Crates.io | rustcrypt-ct-macros |
| lib.rs | rustcrypt-ct-macros |
| version | 0.1.0 |
| created_at | 2025-09-10 17:06:19.926313+00 |
| updated_at | 2025-09-10 17:06:19.926313+00 |
| description | Compile-time obfuscation macros for rustcrypt |
| homepage | |
| repository | https://github.com/ArthurBernard1/rustcrypt |
| max_upload_size | |
| id | 1832737 |
| size | 7,633 |
Procedural macros for rustcrypt providing compile-time obfuscation helpers:
These macros emit obfuscated arrays and perform XOR at runtime to recover data with minimal overhead.
Add to your Cargo.toml:
[dependencies]
rustcrypt = "0.2.0-beta.1"
Then in code:
use rustcrypt::{obf_lit, obf_lit_bytes, obf_lit_cstr, obf_lit_array};
fn main() {
let s = obf_lit!("hello");
let b = obf_lit_bytes!(b"bytes");
let c = obf_lit_cstr!("zero\0term");
let (obf, key) = obf_lit_array!(b"raw");
let _ = (s, b, c, obf, key);
}
License: MIT