![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | can I urlencode/urldecode via vbscript in an HTA? can I urlencode/urldecode via vbscript in an HTA? I'm using the RC4-like encryption algorithm from: http://www.4guysfromrolla.com/webtech/010100-1.shtml I needed a way to encrypt/decrypt some info from a wsh/vbscript... the encrypted info will be stored in a database and later displayed from a web app using asp.net/c#. The asp.net/c# part will be no problem... but I am also creating a simple HTA utility for quickly encrypting/decrypting data and ran into a problem that I think my be fixed by url encoding.... the encrypted text does not display accurately in the textbox (input type=text) in the hta and so results are inaccurate when that encrypted text is subsequently used to decrypt. I know the algorithm works because If I just store all the parts in variables the encrypt/decrypt works, its only when I try to put the encrypted text into a text box for viewing and then subsequently decrypting again that the problem occurs... no error, just inaccurate results. If you happen to be familiar with this algorithm from link above you can see what I mean by tring to encrypt/decrypt 'test' (without quotes) using key '666'(without quotes).... if you put encrypted result into a text box and then use the value of that textbox to decrypt again it is wrong... anyone? |
My System Specs![]() |
| | #2 (permalink) |
| | RE: can I urlencode/urldecode via vbscript in an HTA? Hello James, For example : ' constructs a string with binary (non printable) chars For i=0 To 20: s=s & Chr(i): Next ' encodes the string sEncoded=Escape(s) MsgBox sEncoded ' decodes the previously encoded string sDecoded=Unescape(sEncoded) Hope this helps. -- Gilles LAURENT MVP Windows Server - Admin Frameworks http://glsft.free.fr |
My System Specs![]() |
| | #3 (permalink) |
| | Re: can I urlencode/urldecode via vbscript in an HTA? beautiful, thank you! "Gilles LAURENT [MVP]" <glsft@xxxxxx> wrote in message news:4153CAFC-E08D-40BB-B658-48BD01B782AC@xxxxxx Quote: > Hello James, > > For example : > > ' constructs a string with binary (non printable) chars > For i=0 To 20: s=s & Chr(i): Next > > ' encodes the string > sEncoded=Escape(s) > MsgBox sEncoded > > ' decodes the previously encoded string > sDecoded=Unescape(sEncoded) > > Hope this helps. > > -- > Gilles LAURENT > MVP Windows Server - Admin Frameworks > http://glsft.free.fr > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| New to VBscript, Help please! | VB Script | |||
| CSS and VBscript | VB Script | |||
| Where is VBscript now? | VB Script | |||
| VBscript Help | VB Script | |||
| How to do No hang up VBScript (nohup for VBScript) | VB Script | |||