Implement a classic XOR cipher that encrypts plaintext with a single key character.
Constraints
Example
>>> xor_encrypt('hello', 32)
'HELLO'
>>> xor_encrypt('ABC', 0)
'ABC'
>>> xor_encrypt('', 7)
''
>>> xor_encrypt('abc', 1)
'`cb'
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints