def test_strange_bytes(self): sha1 = self.sha256('hello \x43world') sha2 = hash_string('hello \x43world') self.assertEqual(sha1, sha2)
def test_hash_basic(self): sha1 = self.sha256('hello world') sha2 = hash_string('hello world') self.assertEqual(sha1, sha2)
def test_hash_empty(self): sha1 = self.sha256('') sha2 = hash_string('') self.assertEqual(sha1, sha2)