mirror of
https://github.com/anvie/litcrypt.rs
synced 2026-06-08 13:12:05 +00:00
ecde8099cc
* [Fix] cannot correctly decrypt encrypted words inside Rust module. * [Changed] Use LITCRYPT_ENCRYPT_KEY environment variable as mandatory requirement for setting encryption key, hard-coded secret key is not supported anymore.
15 lines
422 B
Rust
15 lines
422 B
Rust
// Compile this example code and check the compiled output with:
|
|
// $ strings ./target/debug/examples/simple | grep Voldemort
|
|
// the encrypted one will not print anything (just blank).
|
|
|
|
#[macro_use]
|
|
extern crate litcrypt;
|
|
|
|
use_litcrypt!();
|
|
|
|
fn main() {
|
|
// uncomment this for plain (non pre-compile-encrypted string)
|
|
// println!("his name is: {}", "Voldemort");
|
|
println!("his name is: {}", lc!("Voldemort"));
|
|
}
|