def test_short_hashes(self): h = get_hasher(32) assert u'0cc175b9' == h(b'a').hexdigest() assert u'4124bc0a' == h(b'aa').hexdigest() h = get_hasher(64) assert u'4124bc0a9335c27f' == h(b'aa').hexdigest()
def test_get_hasher(self): h = get_hasher(160) assert u'hvfkN_qlp_zhXR3cuerq6jd2Z7g=' == h(b'a').b64digest() assert u'4MkDWJjdUvxlxBRUzsnE0mEb-zc=' == h(b'aa').b64digest() assert u'fiQN50-x7Qj6CNOAY_amqRRiqBU=' == h(b'aaa').b64digest()