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

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

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

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

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

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

        self.assertEqual(sha1, sha2)