开发者

What is the different between encode and encription?

I am using windows form an开发者_运维百科d mysql.

I am very confuse about different between encode and encription?.

encode also change the string value. and decode is give back the string.

In my program,...

  • userid - mcs password - mcs

i want to store these strings in mysql database. but not a same string, for security purpose.

What is secure way to store these datas.

encode and encription which is best for this requirement.

thanks in advance.

i googled for the different but till i am not clear!. any one pls tell me the different between encode and encription?. For my requrement what i use?.

Before leave this question just vist my downvote question in Click here


In short:

  • Encoding transforms data from one representation to another, in such a way that anybody can transform it back. So if you want to prevent other people from seeing the original data, encoding alone is not useful at all.
  • Encryption transforms data in such a way that only persons who know a secret key can get the original data back.

However, there is a third option, which is what you probably will want to use in this case (which is the reason I am posting this, since others have already stated the above points):

  • Hashing. This transforms the data in such a way that no one, not even you, can get the data back - however, each time you hash the same data, you will get the same result. Why is this useful? In your case, by hashing the password, you will accomplish your goal of preventing people who can access the database from seeing what the passwords are. However, you can still verify that someone who tries to log in has provided the correct password: simply hash the password the user entered, and if the result matches what is stored in the database, the password was correct. This is a standard and highly recommended approach; see the Wikipedia article on password hashing.


Encoding is how the different characters are represented according to their memory spaces (8bit etc.). Encryption is how to keep a text hidden with the use of a secret key. After encryption the text turns into a series of arbitrary bytes so you encode it with say Base64 encoding to be able to make it into a readable (and properly cachable) string.

You'll want to encrypt your user information before storing in a database for security purposes. MySql Encryption has many function to help you with that.


Encoding and decoding (such as base64) are often associated with security procedures but encoding data is not at all a secure procedure on its own. Encoding simply turns an arbitrary set of byte data such as jpegs, gifs and encrypted bytes, into a string of text which easier and safer to store and transport across a variety of platforms and systems.

With encryption you actually secure data by processing it with a secret key into a different, encrypted block of data that is very hard to break without the key with which it was created. Decryption does the reverse, provided you have the key.

To secure your data you need to encrypt it. To help you store encrypted data you may want to encode but it is optional. If you store your encrypted data as a db blob, there's no need to encode.

To get the data back, you will need decode it (if you encoded) and then decrypt.


Always google gives the best answer, by quick search.. Very neat with example explanation here.

http://www.blesta.com/2009/07/26/encoding-vs-encryption/
http://www.perlmonks.org/index.pl?node_id=66249

Don't get confused, encoding is not encryption

http://www.di-mgt.com.au/encode_encrypt.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜