String Obfuscation
Compiletime string literal obfuscation for Rust.
Examples
The obfstr! macro returns a borrowed temporary and may not escape the statement it was used in:
assert_eq!;
The obflocal! macro returns the ObfBuffer with the deobfuscated string and is more flexible but less ergonomic:
let str_buf = obflocal!;
assert_eq!;
The obfconst! macro returns the encrypted ObfString for use in constant expressions:
static GSTR: ObfString = obfconst!;
assert_eq!;
The wide! macro provides compile time utf16 string literals:
let expected = &;
assert_eq!;
The random! macro provides compile time random values:
const RND: i32 = random! as i32;
assert!;
License
Licensed under MIT License, see license.txt.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.