I am trying to read lines from a file which contains hashed data.
The data was hash with the following code:
encoder = hashlib.sha224()
encoder.update(string)
file.write(encoder.hexdigest())
how do I rehash the data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As already said, you can’t do that, and that’s the actual idea behind hashing. I think what you are really looking for is encryption.
When the data is encrypted, nobody can read it. Only when you know how to decrypt it, you can read it again. There are many different ways of encryption, such as symmetric and asymmetric, just read about it, or supply more information about what you are really trying to do so we can tell you what encryption you should use.