6

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?

Artjom B.
  • 59,901
  • 24
  • 121
  • 211
Xravn
  • 244
  • 1
  • 6
  • 22

1 Answers1

4

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.

t4nhpt
  • 5,204
  • 3
  • 32
  • 43
martinstoeckli
  • 22,266
  • 4
  • 54
  • 84