123456789101112131415 |
- def generateHashUsingSHA256(fileName):
- print("SHA_256")
- data=getData(fileName)
- data=bytes(data,"utf-8")
- start = timer()
- h = SHA256.new()
- h.update(data)
- #Because this looks better when viewed instead of h.digest()
- digest=h.hexdigest()
- end = timer()
- #print(digest)
- print("Time Taken to generate Hash is ",(end-start))
- print("Time Taken to Hash per byte is ",(end-start)/len(data))
-
-
|