Esempio n. 1
0
    def test_strange_bytes(self):
        sha1 = self.sha256('hello \x43world')
        sha2 = hash_string('hello \x43world')

        self.assertEqual(sha1, sha2)
Esempio n. 2
0
    def test_hash_basic(self):
        sha1 = self.sha256('hello world')
        sha2 = hash_string('hello world')

        self.assertEqual(sha1, sha2)
Esempio n. 3
0
    def test_hash_empty(self):
        sha1 = self.sha256('')
        sha2 = hash_string('')

        self.assertEqual(sha1, sha2)
Esempio n. 4
0
    def test_strange_bytes(self):
        sha1 = self.sha256('hello \x43world')
        sha2 = hash_string('hello \x43world')

        self.assertEqual(sha1, sha2)
Esempio n. 5
0
    def test_hash_basic(self):
        sha1 = self.sha256('hello world')
        sha2 = hash_string('hello world')

        self.assertEqual(sha1, sha2)
Esempio n. 6
0
    def test_hash_empty(self):
        sha1 = self.sha256('')
        sha2 = hash_string('')

        self.assertEqual(sha1, sha2)