February 28, 2011

Difference between encryption and encoding


Both are not same. But seems to be synonymous.

1. Encoding is to convert data by the use of a code.
2. Encrypting is to format (electronic data) according to a standard format

Encryption is secret . This can be achieved by converting string to cipher text using cryptographic algorithm and key. Encryption and decryption happens using this unique key. The cryptographic encryptioalgorithm and key are responsible for the encryption quality. Encryption involves encoding internally. encoding of the data takes place both before and after encryption.

To use encryption in .NET we need to import the name space  System.Security.Cryptography

Encoding is the way the data get formatted. Generally used in cryptography to mean that secrecy is not involved. If we know the format that is used to encode the data,the encoded data can be decoded by anonymous. So please do not use encoding to store passwords in database instead use encryption.


No comments: