To create a SHA3-512 hash from a string in python, you can use the hashlib library from the standard library or the SHA3_512 hash function from the cryptography library. Here are examples using both libraries:
main.py156 chars9 lines
Output:
main.py97 chars2 lines
main.py214 chars10 lines
Output:
main.py95 chars2 lines
Both examples produce the same SHA3-512 hash for the given input string "Hello, World!". However, the cryptography library provides more flexibility and options for hashing.
gistlibby LogSnag