Skip to main content
March 18, 2007
Question

How to use XOR Encrption VBscript

  • March 18, 2007
  • 3 replies
  • 1401 views
Does any one know yow to use XOR Encrition in VBscrtip with regular .asp?

I have searched the web but the samples are more complicated then I understand or need.

I need somting to just show how to encrypt and decript a given key.

For example:

<% Dim key
key = "TheTempKey"
encrypt ( "this is a test message to incrypt", key)
%>

<%= show incripted message %>
<%= show decripted message %>

This topic has been closed for replies.

3 replies

Inspiring
March 19, 2007
Just to give my 2 cents:

1) XOR against a string of text is NOT a strong encryption algorithm. It would probably be one of the FIRST things a determined hacker would try.
2) If you do choose to use XOR, be advised that you could end up with "non XML-safe" characters.
3) If you need strong encryption, DO NOT USE XOR algorithms.

Rest my case.
March 19, 2007
Thank you for your advice but we I need to use XOR because I am using Director shockwave to decript and .asp to encrypt it. I know how Director will read it already.

I am just trying to understand the basics so I can add a little extra security on the .asp side.

I am also going to add changing varable so the encryption will be fine (so there will be 2 different types of encryptions).

I just do not know how to write in .asp with Vbscript like I wrote in the original message. I am not actually going to do that exact thing. But if I see that I can apply the usage the way I need it.

So if any one knows how to properly write what I need I could use that for my project.

Thank you for any help.
Inspiring
March 18, 2007
That is not a secure way to use encryption. If you are going to encrypt try using RC4.

http://www.4guysfromrolla.com/webtech/010100-1.shtml