Re: Encrypt String while restricting certain characters
From: Alek Davis (alek_DOT_davis_AT_intel_DOT_com)
Date: 07/07/03
- Previous message: Antonis Theofanopoulos: "Has _ANYONE_ ever got the aspnet_setreg utility to work for them?"
- In reply to: ScriptNFool: "Encrypt String while restricting certain characters"
- Next in thread: ScriptNFool: "Re: Encrypt String while restricting certain characters"
- Reply: ScriptNFool: "Re: Encrypt String while restricting certain characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 7 Jul 2003 13:24:33 -0700
I did not try it, but logically, you should be able to use
HttpUtility.UrlEncode and HttpUtility.UrlDecode to convert encrypted bytes
to/from query-string compatible form. Alternatively, you can convert
encrypted data into a base64-encoded string and append it as a last query
string parameter. In the last scenario, you would need to treat it
differently from a regular QueryString value by manually locating the
beginning of the string (you must make sure that the name of the value is
unique) and extracting the substring from beginning position till the end.
Alek
"ScriptNFool" <ScriptNFool@hotmail.com> wrote in message
news:7a5ee20.0307061457.589474d9@posting.google.com...
> Is it possible to encrypt a string but restrict certain characters in
> the output?
>
> For example, I'm trying to encrypt the value of a QueryString item in
> a web URL, and any '=' signs or '&' signs would cause problems with
> the rest of the QueryString.
>
> I'm pretty new to encryption, so I don't know if this is a relatively
> easy thing to do. Any help would be greatly appreciated.
>
> -SF
- Previous message: Antonis Theofanopoulos: "Has _ANYONE_ ever got the aspnet_setreg utility to work for them?"
- In reply to: ScriptNFool: "Encrypt String while restricting certain characters"
- Next in thread: ScriptNFool: "Re: Encrypt String while restricting certain characters"
- Reply: ScriptNFool: "Re: Encrypt String while restricting certain characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|