Home > Articles > Web Development > Ajax and JavaScript

Encrypting Text with JavaScript

  • Print
  • + Share This
Encoding and encrypting cookie characters helps slow down cookie interlopers seeking sensitive material such as credit card numbers. Paul McFedries covers the basics here and gives you an algorithm to use in encryption.
This article is excerpted from Special Edition Using JavaScript.
From the author of

Why the Need for Encryption?

One of the reasons people dislike cookies is that the values they store on the user's computer are plain text strings. That's not a big deal for relatively mundane cookie values such as visit counts or favorite background colors, but it's a very big deal for sensitive cookie data such as passwords and credit card numbers. If someone gained direct access to the user's computer, it would be criminally easy for him to read these cookie values.

  • + Share This
  • 🔖 Save To Your Account