12345678910111213141516171819202122232425 |
- def generateHashUsingSHA3_256(fileName):
- print("SHA3_256")
- data=getData(fileName)
- data=bytes(data,"utf-8")
- start = timer()
- h = SHA3_256.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))
-
- generateFiles()
- generateHashUsingSHA256("kbfile.txt")
- generateHashUsingSHA256("mbfile.txt")
- generateHashUsingSHA512("kbfile.txt")
- generateHashUsingSHA512("mbfile.txt")
- generateHashUsingSHA3_256("kbfile.txt")
- generateHashUsingSHA3_256("mbfile.txt")
|