rivest_cipher 0.1.0

Simple module with Rivest Cipher implemntation
Documentation
  • Coverage
  • 57.89%
    11 out of 19 items documented0 out of 15 items with examples
  • Size
  • Source code size: 15.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 413.8 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • bobaxix/rivest_cipher
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bobaxix

Rivest cipher

Simple Rust module with Rivest Cipher implementation.

Implemented schemes

  • RC2
  • RC5 (RC5/8 RC5/16 RC5/32 RC5/64)
  • RC6

Usage

Installation

cargo add rivest_cipher

Example

use rivest_cipher::schemes::rc5;

let key: [u8; 64] = { ... };
let plaintext: [u8; 16] = { ... };

let encryptor: Rc5<u32> = rc5::setup::<u32>(&key, 12);
let ciphertext: Vec<u8> = encryptor.encrypt(&plaintext).unwrap();

assert_eq!(plaintext.as_slice(), encryptor.decrypt(&ciphertext).unwrap().as_slice());