1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
//! A cryptographic tomb of ciphers forgotten by time. //! //! ## Example usage //! //! ```rust //! extern crate cipher_crypt; //! //! use cipher_crypt::{Cipher, Caesar, ROT13}; //! //! fn main(){ //! let m1 = "I am my own inverse"; //! assert_eq!(m1, ROT13::apply(&ROT13::apply(m1))); //! //! let m2 = "Attack at dawn 🗡️"; //! let c = Caesar::new(3).unwrap(); //! assert_eq!(m2, c.decrypt(&c.encrypt(m2).unwrap()).unwrap()); //! } //! ``` //! //! ## Disclaimer //! //! There's a reason these archaic methods are no longer used - it's because they are extremely //! easy to crack! Intended for learning purposes only, these ciphers should not be used to //! encrypt data of any real value. extern crate rulinalg; extern crate num; mod common; pub mod caesar; pub mod vigenere; pub mod rot13; pub mod railfence; pub mod fractionatedmorse; pub mod hill; pub mod autokey; pub use common::cipher::Cipher; pub use caesar::Caesar; pub use vigenere::Vigenere; pub use railfence::Railfence; pub use rot13 as ROT13; pub use hill::Hill; pub use fractionatedmorse::FractionatedMorse; pub use autokey::Autokey;