Python unhash value

后端 未结 4 1510
一向
一向 2020-12-16 19:24

I am a newbie to the python. Can I unhash, or rather how can I unhash a value. I am using std hash() function. What I would like to do is to first hash a value send it somew

4条回答
  •  被撕碎了的回忆
    2020-12-16 19:55

    You can't "unhash" data, hash functions are irreversible due to the pigeonhole principle

    http://en.wikipedia.org/wiki/Hash_function
    http://en.wikipedia.org/wiki/Pigeonhole_principle

    I think what you are looking for encryption/decryption. (Or compression or serialization as mentioned in other answers/comments.)

提交回复
热议问题