I wanted to create a python program thats asks for an input then hashes(sha-256) the input then prints it. Does this already exist? How would I go about doing so.
The Python hashlib module is an interface for hashing messages easily. This contains numerous methods which will handle hashing any raw message in an encrypted format. The core purpose of this module is to use a hash function on a string, and encrypt it so that it is very difficult to decrypt it.
SHA-256 is used in some of the most popular authentication and encryption protocols, including SSL, TLS, IPsec, SSH, and PGP. In Unix and Linux, SHA-256 is used for secure password hashing. Cryptocurrencies such as Bitcoin use SHA-256 for verifying transactions.
using hashlib
:
from hashlib import sha256
input_ = input('Enter something: ')
print(sha256(input_.encode('utf-8')).hexdigest())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With