E-WebStyle Web Design Houston E-WebStyle Web Design Houston

Archive for the ‘.asp’ Category

EnDeCrypt Error with .asp ]

Thursday, February 12th, 2009

Before you get to excited, I do not have a “good” solution to this problem and I cant give specific details but I can outline a problem and hopefully someone else has experienced the problem.  I had a credit card number on one of my client websites that after it was encrypted I could not do anything with it.  Here is an example to help explain what I experienced.

Lets say CC Number is: 12345678910
Lets say I was using “testing123″ for the psw in the EnDeCrypt.

The following code:
CCNumberToStore = EnDeCrypt(CCNumber,PSW)
response.write “here” & CCNumberToStore & “AfterCC”

Would show:
here]

What ever character set that occured after ] would cause the server to not respond on that line?  If I did a response.write server.urlencode(CCNumberToStore) if would show %5D only.

This was a specific problem when trying to store this in the database because the statement I would put together would cause an error because the statement ended with these characters ,’]

I could not create the string after ] again because it seemed that the server could not handle it.  Additionally, it was not generating an error.  The only error I go was the error related to the poorly formated SQL statement.

My solution was to try a different PSW.  One of the new PSW’s also created the problem.  When I changed the PSW one more time if  did work.  I imagine that there is some string when combined with my current PSW that would cause the problem again.  I would love to try any ideas you might have for debugging this problem.

Chris