XOR Cypher
The XOR Cypher is simple: To encrypt, you do a bitwise XOR of the message with a key. To decrypt it, you XOR it again with the same key.
Write a function encrypt
that does an XOR encryption of a message string given a key string. If the message is longer than the key, repeat the key.
Note, I see this as an exercise in JVM byte manipulation.
Thanks to this site for the problem idea, where it is rated Expert in JavaScript. The problem has been modified.
Please submit your solutions as comments on this gist.
To subscribe: https://purelyfunctional.tv/newsletter/