| Crates.io | rc6_rs |
| lib.rs | rc6_rs |
| version | 0.1.0 |
| created_at | 2025-07-16 03:45:38.713482+00 |
| updated_at | 2025-07-16 03:45:38.713482+00 |
| description | RC6 implementation in Rust |
| homepage | |
| repository | https://github.com/cathaysia/rc6_rs |
| max_upload_size | |
| id | 1754852 |
| size | 34,325 |
A Rust implementation of the RC6 block cipher, translated from libtomcrypto using c2rust.
RustCrypto crate traitsuse rc6_rs::Rc6;
use cipher::consts::U32;
// Create cipher with 32-byte key
let key = [0u8; 32];
let cipher = Rc6::<U32>::new(&key, 20); // 20 rounds
// Encrypt 16-byte block
let plaintext = [0u8; 16];
let ciphertext = cipher.encrypt(&plaintext).unwrap();
// Decrypt
let decrypted = cipher.decrypt(&ciphertext).unwrap();
assert_eq!(plaintext, decrypted.as_slice());