Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Difference between Decode and Decrypt? [duplicate]

This decrypt and decode word is used by most of the people. But whenever i asked them about "what is the difference between decode and decrypt?" No one is able to answer perfectly way that i wanted to hear. Can i be clear about this?

like image 247
Xravn Avatar asked Oct 19 '22 04:10

Xravn


1 Answers

Encrypting and decrypting are used to hide something (a secret message), while encoding and decoding are used to bring an information into a specific form (e.g. to send it over an internet connection).

So encryption is part of cryptography and usually relies on a secret key. Only with this key one can decrypt the message read the original message.

An example for encoding is the URL to open a web page. In this URL some characters have a special meaning like the ?& characters. If you want to pass those characters as a parameter you have to encode them, so the browser doesn't interpret them. The urlencode() function is a good place to get more information.

Another good example for encoding is the UTF-8 standard. Surely you know the ASCII table, where you can represent 256 characters with one byte. The UTF-8 encoding allows us to represent much more characters, but of course, you cannot do this with a single byte. The UTF-8 encoding defines when to use 1 or 2 or 3 bytes, and how a reader can recognize those 3-byte characters.

like image 131
martinstoeckli Avatar answered Oct 22 '22 19:10

martinstoeckli