crypto.rc4 #

fn new_cipher #

fn new_cipher(key []byte) ?Cipher

new_cipher creates and returns a new Cipher. The key argument should be the RC4 key, at least 1 byte and at most 256 bytes.

fn (Cipher) reset #

fn (mut c Cipher) reset()

reset zeros the key data and makes the Cipher unusable.good to com

Deprecated: Reset can't guarantee that the key will be entirely removed from the process's memory.

fn (Cipher) xor_key_stream #

fn (mut c Cipher) xor_key_stream(mut dst []byte, mut src []byte)

xor_key_stream sets dst to the result of XORing src with the key stream.
Dst and src must overlap entirely or not at all.