ciphers 0.1.0

Cipher implementation library.
Documentation
  • Coverage
  • 84.62%
    22 out of 26 items documented1 out of 5 items with examples
  • Size
  • Source code size: 118.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.55 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sradley

Ciphers v0.1.0

MIT licensed crates.io Released API docs

Ciphers is a Rust library that provides implementations of many different classical ciphers.

Get started by looking at the documentation.

1. Supported Ciphers

There are currently 16 different supported ciphers.

Transposition Monoalphabetic Polyalphabetic Polygraphic Other
Rail-fence Simple Substitution Vigenere Playfair ADFGX
Columnar Transposition Caesar Beaufort Four-Square ADFGVX
Affine Autokey
Polybius Square Running Key
Atbash Porta

2. Installation

Simply put the following in your Cargo.toml.

[dependencies]
ciphers = "0.1.0"

3. Example Usage

E.g. using the Vigenere cipher.

use ciphers::{Cipher, Vigenere};

fn main() {
    let vigenere = Vigenere::new("examplekey");

    // encipher
    let ctext = vigenere.encipher("someexampletexthere").unwrap();
    println!("ciphertext: {}", ctext);

    // decipher
    let ptext = vigenere.decipher(&ctext).unwrap();
    println!("plaintext:  {}", ptext);
}
ciphertext: WLMQTIEWTJIQEJISIBI
plaintext:  SOMEEXAMPLETEXTHERE

4. To be Implemented

There are currently 6 different ciphers to be implemented.

Transposition Monoalphabetic Polyalphabetic Polygraphic Other
Rot13 Gronsfeld Hill Bifid
Trifid
Straddle Checkerboard