rot-13 0.1.1

rot-13 encryption and decryption
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented2 out of 4 items with examples
  • Size
  • Source code size: 12.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.42 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • cameronp98/rot13
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • cameronp98

rot13

Rot-13 encryption and decryption (written in rust)

Build Status Crates.io Crates.io

USAGE:
    rot13 [FLAGS] [OPTIONS] --decrypt --encrypt

FLAGS:
    -d, --decrypt    decrypt the provided input
    -e, --encrypt    encrypt the provided input
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -i, --input <PATH>     the input file to use. defaults to stdin
    -o, --output <PATH>    the output file to use. defaults to stdout

Library usage:

use rot13::{rot13_slice, Mode};

fn main() {
    let input = b"Hello, World!";
    
    // try encryption
    let encrypted = rot13_slice(Mode::Encrypt, input);
    println!("{}", ::std::str::from_utf8(&encrypted).unwrap());
    
    // since case is preserved during encryption, the decrypted
    // product should be the same as the original input
    let decrypted = rot13_slice(Mode::Decrypt, &encrypted);
    assert_eq!(input, decrypted.as_slice());
}