1use rustfuscator::Obfuscator;
2
3fn main() {
4 let original_text = "simple text or password";
5 let o = Obfuscator::new("randompassphrase".as_bytes())
6 .with_salt_length(6)
7 .with_separator(rustfuscator::DEFAULT_SEPARATOR_STR);
8
9 match o.obfuscate(original_text) {
11 Ok(obfuscated_text) => {
12 println!("Obfuscated text: {}", obfuscated_text);
13
14 match o.unobfuscate(&obfuscated_text) {
16 Ok(unobfuscated_text) => {
17 println!("Unobfuscated text: {}", unobfuscated_text);
18 }
19 Err(err) => {
20 println!("Error: {}", err);
21 }
22 }
23 }
24 Err(err) => {
25 println!("Error: {}", err);
26 }
27 }
28}