Difference between encryption and hashing

前端 未结 6 1830
醉梦人生
醉梦人生 2021-02-20 11:09

In our project there are several places where we could\'ve gotten away with hashing. For example, we store an encrypted reference between a license and the licensed object in t

6条回答
  •  一个人的身影
    2021-02-20 11:52

    Well, encryption is a two-way process. Assuming you are using a key-based encryption, you are safe as long as the encryption key is safe and you're using a modern algorithm (say, AES). Hashing, on the contrary is a one way process, that it should be practically impossible to reconstruct the hash input from the hashed value. So, not having a key, hashing may be considered safer. It may also be less computationally hungry.

提交回复
热议问题