# XOR cipher where the key is repeated to match the length of the message.
class RepeatingKeyXorCipher
super Cipher
# Cryptographic key used in encryption and decryption.
var key = new Bytes.empty
redef fun encrypt do
assert key.length > 0
ciphertext = plaintext.xorcipher(key)
end
redef fun decrypt do
assert key.length > 0
plaintext = ciphertext.xorcipher(key)
end
end
lib/crypto/xor_ciphers.nit:87,1--103,3