• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Creating and Using Cookies > Debugging and Troubleshooting Script P...

Debugging and Troubleshooting Script Problems

Building a Stronger Key

The encryption scheme in Listing 25.8 is still vulnerable just by examining the source code. Is there a way to make the encryption stronger?

The problem with the encryption scheme in Listing 25.8 is that the most important part—the key—is hard-wired into the code. A savvy user need only examine the code, see that XOR encryption is being used, and then use the key to reverse the encryption in the same way that the decrypt_cookie() function does.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint