def hamming_distance(string_1, string_2):
    """Calculate the Hamming Distance between two bytestrings."""
    if len(string_1) != len(string_2):
        raise  ValueError('Length of inputs must match.')

    return sum(bin(char_1 ^ char_2).count('1') for char_1, char_2 in zip(string_1, string_2))