def xor_string(hash1, hash2, hash_size):
    'Encrypt/Decrypt function used for password encryption in\n    authentication, using a simple XOR.\n\n    Args:\n        hash1 (str): The first hash.\n        hash2 (str): The second hash.\n\n    Returns:\n        str: A string with the xor applied.\n    '
    xored = [(h1 ^ h2) for (h1, h2) in zip(hash1, hash2)]
    return struct.pack('{0}B'.format(hash_size), *xored)
Encrypt/Decrypt function used for password encryption in
authentication, using a simple XOR.

Args:
    hash1 (str): The first hash.
    hash2 (str): The second hash.

Returns:
    str: A string with the xor applied.
def xor_string(hash1, hash2, hash_size):
    'Encrypt/Decrypt function used for password encryption in\n    authentication, using a simple XOR.\n\n    Args:\n        hash1 (str): The first hash.\n        hash2 (str): The second hash.\n\n    Returns:\n        str: A string with the xor applied.\n    '
    xored = [(h1 ^ h2) for (h1, h2) in zip(hash1, hash2)]
    return struct.pack('{0}B'.format(hash_size), *xored)