Function decrypt_default

Source
pub fn decrypt_default(
    key: [u8; 16],
    ciphertext: &[u8],
) -> Result<Vec<u8>, Error>
Expand description

Given a key and ciphertext, return the plaintext using RC5/32/12/16

Usage example:

use rc5_rs::decrypt_default;
let key = [
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  0x0C, 0x0D, 0x0E, 0x0F,
];

let pt = vec![0x96, 0x95, 0x0D, 0xDA, 0x65, 0x4A, 0x3D, 0x62];
let ct = vec![0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77];
let res = decrypt_default(key, &ct).unwrap();
assert_eq!(pt, res);