Skip to content

Instantly share code, notes, and snippets.

@edgeboyo
Created May 14, 2021 13:36
Show Gist options
  • Save edgeboyo/67718f9967db6db34c437374ec7417c5 to your computer and use it in GitHub Desktop.
Save edgeboyo/67718f9967db6db34c437374ec7417c5 to your computer and use it in GitHub Desktop.
SHA256 Encoder in python
import hashlib
import time
start_time = time.time()
s = input("Input string: ")
for i in range(1000000):
s = hashlib.sha256(s.encode()).digest().hex()
end_time = time.time()
print(s)
print("Took %s seconds" % (end_time - start_time))
@edgeboyo
Copy link
Author

Does the SHA256 hashing a million times and returns the time it required to complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment