Created
September 16, 2023 06:34
-
-
Save roelds/4e4614cbef0d1ba03eb0749df6a45257 to your computer and use it in GitHub Desktop.
Various Python3 snippets
This file contains 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
# hash checksum sha3-224 | |
import sys | |
import hashlib | |
if sys.version_info < (3, 6): | |
import sha3 | |
# initiating the "s" object to use the | |
# sha3_224 algorithm from the hashlib module. | |
s = hashlib.sha3_224() | |
# will output the name of the hashing algorithm currently in use. | |
print(s.name) | |
# will output the Digest-Size of the hashing algorithm being used. | |
print(s.digest_size) | |
# providing the input to the hashing algorithm. | |
s.update(b"GeeksforGeeks") | |
print(s.hexdigest()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment