+ 1
Help me with this question in python:-
Make a program which accepts input from the user and hashes it with a particular hashing algorithm with atleast 6 character salt and returns the hashed value.
3 Antworten
+ 2
import hashlib
inp = str(input()).encode("utf-8")
hashed = hashlib.sha256(inp).hexdigest()
print(hashed)
# You need to encode the string before hashing, otherwise it will return an error
+ 2
Please show us your attempt.
- 1
from hashlib import sha1
txt=bytes("Sololearn")
hash=sha1(txt)
print(hash)
There are other algorithms in hashlib