Skip to content

GirkovArpa/hutton-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Hutton Cipher

The Hutton Cipher of Eric Bond Hutton, implemented in Rust (as a crate).

Usage Example

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
}