Exemple #1
0
def test_invalid_data_type(case_key):
    with pytest.raises(TypeError):
        highwayhash.highwayhash_64(case_key, "")
Exemple #2
0
def test_invalid_key_type(case_data):
    with pytest.raises(TypeError):
        highwayhash.highwayhash_64("", case_data)
Exemple #3
0
def test_64(case_key, case_data, cases_highwayhash_64):
    for i, case in enumerate(cases_highwayhash_64):
        output = highwayhash.highwayhash_64(case_key, case_data[:i])
        hex_output = binascii.hexlify(output).decode("utf8")

        assert case == hex_output
Exemple #4
0
def test_invalid_key_length(case_key, case_data):
    with pytest.raises(ValueError):
        highwayhash.highwayhash_64(case_key + b"\0", case_data)
def test_64(case_key, case_data):
    highwayhash.highwayhash_64(case_key, case_data)