Skip to main content

rc4

Function rc4 

Source
pub fn rc4(key: &[u8], data: &[u8]) -> Vec<u8> 
Expand description

Crypt data under key, returning a fresh buffer.

RC4 is symmetric, so this both encrypts and decrypts.

let ct = rc4(b"foobar", b"secret");
assert_eq!(rc4(b"foobar", &ct), b"secret");