Example #1
0
def blake2s():
    """Test blake2s results"""
    assert blake2.blake2s("blake2", key="blake2") == '9b2c152a9567b530af1dc6549e1f8b67a278b710a1512c92dca5236d27309f87'
    assert blake2.blake2s("hello world", key="hello world") == '846d7f4e70f94df2b07e2f5d59d271d5b4627ab64cc0fc376f411448528bee49'
    assert blake2.blake2s("hello world", hashSize=16, key="hello world") == '4e989fc7739d052dd93ec88962137c08'
    assert blake2.blake2s("hello world", hashSize=4, key="hello world") == 'fef7f902'
    assert blake2.blake2(None) == None
Example #2
0
def blake2s():
    """Test blake2s results"""
    assert blake2.blake2s("blake2", key="blake2") == '9b2c152a9567b530af1dc6549e1f8b67a278b710a1512c92dca5236d27309f87'
    assert blake2.blake2s("hello world", key="hello world") == '846d7f4e70f94df2b07e2f5d59d271d5b4627ab64cc0fc376f411448528bee49'
    assert blake2.blake2s("hello world", hashSize=16, key="hello world") == '4e989fc7739d052dd93ec88962137c08'
    assert blake2.blake2s("hello world", hashSize=4, key="hello world") == 'fef7f902'
    assert blake2.blake2s("hello\x00world", key="hello\x00world") == '36429945e82aec7853fd2bd1c7349a65e4457db81c059b287f7a859e3b26e3f4'
    assert blake2.blake2s(None) == None