Decrypting and encrypting string in python using module in lib . easiest way to do it
import hashlib
a="abcd"
a = hashlib.sha224(a)
z=a.hexdigest()
print p
now I want to decrypt that string which I entered before..
Decrypting and encrypting string in python using module in lib . easiest way to do it
import hashlib
a="abcd"
a = hashlib.sha224(a)
z=a.hexdigest()
print p
now I want to decrypt that string which I entered before..
You don't encrypt the string, you hash it. Therefore, it can't be "decrypted" - hashes are meant to be one way functions, i.e. there is no simple way to "calculate" the input from the output.
See e.g. here for more detailed definitions of encrypting and hashing: Difference between Hashing a Password and Encrypting it
You are creating a hash of the input string. You can use this hash to check if another input string is the same as the original input string.
You are not supposed to be able to decrypt a hash. That would defeat the whole purpose.