crypto.cipher #

fn safe_xor_bytes #

fn safe_xor_bytes(mut dst []byte, a []byte, b []byte, n int)

safe_xor_bytes XORs the bytes in a and b into dst it does so n times. Please note: n needs to be smaller or equal than the length of a and b.

fn xor_bytes #

fn xor_bytes(mut dst []byte, a []byte, b []byte) int

NOTE: Implement other versions (joe-c) xor_bytes xors the bytes in a and b. The destination should have enough space, otherwise xor_bytes will panic. Returns the number of bytes xor'd.

fn xor_words #

fn xor_words(mut dst []byte, a []byte, b []byte)

xor_words XORs multiples of 4 or 8 bytes (depending on architecture.) The slice arguments a and b are assumed to be of equal length.