xor

Returns a new array where every byte is xor-combined with the repeating key.

The key is applied cyclically: output index i is this[i] xor key[i % key.size]. The receiver is not modified. Applying the same key twice restores the original bytes. An empty receiver produces an empty array.

Return

a new array of the same size as the receiver.

Parameters

key

the key bytes to repeat over the input.

Throws