views:

164

answers:

1

Are there any simple encrypt/decrypt functions in Classic ASP?

The data that needs to be encrypted and decrypted is not super sensitive. So simple functions would do.

+1  A: 

4guysfromrolla.com: RC4 Encryption Using ASP & VBScript

See the attachments at the end of the page.

The page layout looks a bit broken to me, but all the info is there. I made it readable it by deleting the code block from the DOM via bowser development tools.

Tomalak
The more I thought about it.. My scenario is little more complex. Can you see if you can answer this question? http://stackoverflow.com/questions/3453908/key-management-classic-asp-encrypt-decrypt
Broken Link
@Broken Link: I don't see why using RC4 is not suitable for the scenario described. You need a shared secret between your two ASP pages (a common password) and then you will be able to determine if the encrypted message sent to the one page was generated by the other. The password must never be compromised of course, that's the only catch. P.S.: I'm not going to answer the other question to raise the chance that somebody else gives it a try.
Tomalak
That was my intention when I posted this question.But the issues is lets say I'm using RC4.. I encrypted some random key and sent it, then when I have to validate it, the RC4 will just decrypt the data what ever it is, it won't tell weather it was able to decrypt successfully or not. Since I'm not storing the generated key in first place, I don't know how if that was the key I generated or not.
Broken Link
@Broken Link: That's a general problem with encryption, not one with RC4. If you want the message recognizable, then you must make it recognizable. Don't use a random string, give it structure. Use the IP of the client, the current time, a fixed format, and then encrypt it. Encrypting a random string alone makes no sense at all. A structured string will look random enough after encryption, but after decryption you will be able to find out if it is bogus or not by comparing actual against expected structure.
Tomalak