def test_md5_iterated(self): h = Hash.md5_new() h.update('a') h.update('b') h.update('c') digest = h.digest() expected = b'\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f\x72' self.assertEqual(expected, digest)
def test_md5_empty(self): h = Hash.md5_new() digest = h.digest() expected = b'\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42\x7e' self.assertEqual(expected, digest)