ps='1024'
salt=b'>}\x1a\xd5\xd3\x9d\x080'
a=hashlib.pbkdf2_hmac('sha256',ps.encode('utf-8'),salt,100000)
print(a)
# this is the output
a=b'\xfeI\x8f.6\xd8A1\x9aOMIB&\x81>\xd6t\xe3\xb1\xa2\xb2\xfen\xd9\x03\x84l\xf6q\xc2\xb8'
How Can I get the value back ‘1024’ i.e from a to ps again?
>Solution :
you can’t decrypt a sha256 hashed String (that’s what it is used for) you can only hash (and salt) another string and check if the hashes match (then you know the same string was input).
The only way to get the original string is to brute force it with something like hashcat.