Created
May 14, 2021 13:36
-
-
Save edgeboyo/67718f9967db6db34c437374ec7417c5 to your computer and use it in GitHub Desktop.
SHA256 Encoder in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does the SHA256 hashing a million times and returns the time it required to complete