def xor(string, byte):
    """Exclusive-ors each character in a string with the given byte."""
    results = []
    for ch in string:
        results.append(chr(ord(ch) ^ byte))
    return ''.join(results)