What is the difference between Obfuscation, Hashing, and Encryption?

后端 未结 11 1876
终归单人心
终归单人心 2020-12-13 09:42

What is the difference between Obfuscation, Hashing, and Encryption?

Here is my understanding:

  • Hashing is a one-way algorithm; cannot be reversed
11条回答
  •  难免孤独
    2020-12-13 10:10

    Obfuscation is merely making something harder to understand by intruducing techniques to confuse someone. Code obfuscators usually do this by renaming things to remove anything meaningful from variable or method names. It's not similar to encryption in that nothing has to be decrypted to be used.

    Typically, the difference between hashing and encryption is that hashing generally just employs a formula to translate the data into another form where encryption uses a formula requiring key(s) to encrypt/decrypt. Examples would be base 64 encoding being a hash algorithm where md5 being an encryption algorithm. Anyone can unhash base64 encoded data, but you can't unencrypt md5 encrypted data without a key.

提交回复
热议问题