Could please someone explain me what is the difference between Encryption and Encoding? What are the scenarios you should use them and why?
-
1you want answer with reference to WCF or in general? and why u have not use google? – CRDave Dec 25 '12 at 09:11
2 Answers
The main difference between this two things is that encoding is converting something to something else that is well known and that is not a secret. For example, encoding some text to base64 to save memory and store data like that. When you use them, you will encode it back to string.
Encryption is, in fact, encoding data, but data that was decrypted - for security reasons. Decryption should not be public - it means that only one with decryption key, could decrypt data.

- 2,078
- 3
- 26
- 38
Though the two might seem similar, what you wish to accomplish is the main difference.
Where encryption is used to seal the content of a file, so no others can read it, encoding is used for other means. Encryption mostly uses a password of passphrase of some sort.
For instance, if you compress a file with zip, you're encoding it. Everyone can just decode it, if they know the correct algorithm. However, if you compress the zip with a passphrase, it's encrypted as well.
Examples of encryption are:
- SSL
- Encrypted zip archives
- ...
Examples of encoding are:
- Compression
- Channel Coding (adding extra bits to data send across a channel so you can see if the arrived data is correct, ans possibly correct it if it wasn't)
- ...

- 5,058
- 1
- 18
- 23