Exemplo n.º 1
0
def hashing_multiple_values_in_different_order_gives_different_hash():
    first_hasher = Hasher()
    first_hasher.update("one")
    first_hasher.update("two")
    
    second_hasher = Hasher()
    second_hasher.update("two")
    second_hasher.update("one")
    
    assert_not_equal(first_hasher.ascii_digest(), second_hasher.ascii_digest())
Exemplo n.º 2
0
 def hash_for_files(self, files):
     files_dir = self.create_files(files)
     
     hasher = Hasher()
     hasher.update_with_dir(files_dir)
     return hasher.ascii_digest()
Exemplo n.º 3
0
 def create_hash():
     hasher = Hasher()
     hasher.update("one")
     hasher.update("two")
     return hasher.ascii_digest()