Expand description
§playfair_cipher_rs
This crate provides a simple implementation of the Playfair Cipher. You can use this crate to encrypt and decrypt messages using the Playfair Cipher. Currently, this crate only supports the English alphabet. Please note that the Playfair Cipher does not support the letter J. The letter J is replaced with the letter I.
Please see the Playfair Cipher Wikipedia article for more information.
§Examples
use playfair_cipher_rs::Playfair;
let playfair = Playfair::new("playfair example".to_string());
let cipher_text = playfair.encrypt("Hide the gold in the tree stump".to_string());
assert_eq!(cipher_text, "BMODZBXDNABEKUDMUIXMMOUVIF");Structs§
- Playfair
- The Playfair cipher uses a 5 by 5 table containing a key word or phrase.