Encoding something is (like was said before) changing the way information or data is presented; though, it is not meant to hide the meaning of the data. For example, in a URL, a space is encoded as '%20'. That encoding is not meant to protect or "make private" the data; rather, it is meant to "encode" the data in that it can be understood by the recipient.

Encrypting information and/or data is a process that obfuscates the data. In an encrypted URL (if such a thing were to exist), the first space would be an 'a' and the second space would be a '3' and the third space would be a '-', etc., etc. (assuming a more powerful encryption algorithm than char substitution). An encrypted piece of data is not meant to facilitate communication, per se. Rather, it is meant to guarantee certain attributes of the data like the fact that it will only be read by privileged individuals.

So, in a nutshell, encoding is just a way two or more systems designate as a way of communication (via character substitutions, or XML tags, or whatever). Encryption is a method to completely obscure the data.

In a real world example, http communication over SSL is an example of both. First, the client encodes the data in such a way that the server will understand it (URL tags and such). Then, the client encrypts the data so that no eaves droppers will know the meaning of the data. Once the encrypted, encoded information is received by the server; the server decrypts it and passes the encoded data (the data that can be understood) to whichever process (httpd).

I hope that helps a little.


In reply to Re: Difference between encoding and encryption? by enoch
in thread Difference between encoding and encryption? by r.joseph

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.