| Crates.io | hutton-rust |
| lib.rs | hutton-rust |
| version | 0.1.1 |
| created_at | 2020-10-07 08:38:40.097549+00 |
| updated_at | 2020-10-07 08:48:37.923377+00 |
| description | The Hutton cipher implemented as a Rust crate |
| homepage | |
| repository | https://github.com/GirkovArpa/hutton-rust |
| max_upload_size | |
| id | 296880 |
| size | 5,619 |
The Hutton Cipher of Eric Bond Hutton, implemented in Rust (as a crate).
extern crate hutton_rust;
use hutton_rust::encrypt;
fn main() {
// the following 3 values must all consist of lowercase letters in the range [a-z]
// else, panicc!
let input = String::from("helloworld");
let password = String::from("foo");
let key = String::from("bar");
// the last boolean argument is whether to decrypt instead of encrypt
let output = encrypt(&input, &password, &key, false);
println!("{}", output); // => pwckfenttc
}