encrypt

Function encrypt 

Source
pub fn encrypt<W: Word>(pt: [W; 2], key: &Vec<u8>, rounds: usize) -> [W; 2]
Expand description

Encrypts a plaintext pt and returns a ciphertext ct. The pt is an array of two words W (u8, u16, u32, u64, u128)

Example:

use rc5_cipher::encrypt;

let rounds = 12;
let key = vec![0x00, 0x01, 0x02, 0x03];
let pt  = [0x00u8, 0x01];

let ct = encrypt(pt, &key, rounds);
     
assert_eq!(ct, [0x21u8, 0x2A]);