cipher_crypt/
lib.rs

1//! A cryptographic tomb of ciphers forgotten by time.
2//!
3//! ## Example usage
4//!
5//! ```rust
6//! extern crate cipher_crypt;
7//!
8//! use cipher_crypt::{Cipher, Caesar, Rot13};
9//!
10//! fn main(){
11//!   let m1 = "I am my own inverse";
12//!   assert_eq!(m1, &Rot13::decrypt(&Rot13::encrypt(m1)));
13//!
14//!   let m2 = "Attack at dawn 🗡️";
15//!   let c = Caesar::new(3);
16//!   assert_eq!(m2, c.decrypt(&c.encrypt(m2).unwrap()).unwrap());
17//! }
18//! ```
19//!
20//! ## Disclaimer
21//!
22//! There's a reason these archaic methods are no longer used - it's because they are extremely
23//! easy to crack! Intended for learning purposes only, these ciphers should not be used to
24//! encrypt data of any real value.
25//!
26extern crate num;
27extern crate rulinalg;
28
29#[macro_use]
30extern crate lazy_static;
31extern crate lipsum;
32#[macro_use]
33extern crate maplit;
34
35pub mod adfgvx;
36pub mod affine;
37pub mod autokey;
38pub mod baconian;
39pub mod caesar;
40pub mod columnar_transposition;
41mod common;
42pub mod fractionated_morse;
43pub mod hill;
44pub mod playfair;
45pub mod polybius;
46pub mod porta;
47pub mod railfence;
48pub mod rot13;
49pub mod scytale;
50pub mod vigenere;
51
52pub use crate::adfgvx::ADFGVX;
53pub use crate::affine::Affine;
54pub use crate::autokey::Autokey;
55pub use crate::baconian::Baconian;
56pub use crate::caesar::Caesar;
57pub use crate::columnar_transposition::ColumnarTransposition;
58pub use crate::common::cipher::Cipher;
59pub use crate::fractionated_morse::FractionatedMorse;
60pub use crate::hill::Hill;
61pub use crate::playfair::Playfair;
62pub use crate::polybius::Polybius;
63pub use crate::porta::Porta;
64pub use crate::railfence::Railfence;
65pub use crate::rot13 as Rot13;
66pub use crate::scytale::Scytale;
67pub use crate::vigenere::Vigenere;