Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RC4 Encryption Using ASP & VBScript .... converting from hex

Status
Not open for further replies.

tripm8

Programmer
Jun 2, 2004
13
GB
I am using a script from 4guysfromrolla to encrypt some data and then email it to myself. I use server.urlencode to convert it to hex format before i email it so it displays properly in my email program.

That works fine...the problem occurs when i need to decrypt it again. . . .how do i get the data back from hex to its original format when i need to decrypt the information?

Any help would be much appreciated
 
Typically, if you use server.urlencode to modify some data, you would use server.htmlencode to change it back again. Or am I missing something...

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
In this case I am using server.urlencode to change the data from a "binary" format to hex...so i need to change it back to the binary format it came from.

Here is a quote from the original script: -

Here we display the encrypted text in urlencoded form. The reason it's urlencoded is because it is essentially now "binary" data, which may mess up many browser displays...

so i don't think server.htmlencode will work
 
Try to use a base 64 encoding of your data it will ashure you'll get only valid characters, then use base 64 decode at destination.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top