Re: Encrypt QueryString

From: Peter Bromberg (pbromberg.nospam@yahoo.com)
Date: 06/23/02


From: "Peter Bromberg" <pbromberg.nospam@yahoo.com>
Date: Sat, 22 Jun 2002 22:45:51 -0400


If all you really need is basic, simple encryption to discourage "prying
eyes",
you might want to consider a simple XOR method on the querystring value(s).
Simply iterate through each character in the querystring and convert it to
the value obtained via XOR with an integer from say, 1 through 255.
The advantage of this is that it can easily be done on the client side with
VBscript or Javascript without .NET, and you can use the same function to
"decrypt" by passing in the encrypted string to the very same method XOR'ing
each character against the same integer.
Quick, fast, very few lines of code.
HTH

"David Adams" <mel1daa@hotmail.com> wrote in message
news:#ayJVdaGCHA.2584@tkmsftngp08...
> Hi all,
>
> Is there a way to easily encrypt a QueryString with .NET? I have a
datagrid
> with 30 rows of data that have a hyperlink to user information
> (userinfo.aspx?ID=1234). I would simply like to have an encryption method
> that I can use to quickly encrypt and decrypt this value with little
> overhead.
>
> Any suggestions would be appreciated!
>
> Dave
>
>



Relevant Pages

  • Simple string encryption (solution)
    ... This message includes a solution for encrypting and encoding a string ... into a "safe" character string that you can read or pass in ASP.NET ... pass around a moniker in my querystring. ... encryption example code that Lion Shi posted a while back on Usenet, ...
    (microsoft.public.dotnet.framework)
  • Re: Need better model to implement this scenario
    ... encryption and just create a weak encryption system of your own. ... If no one knows your algorithm, ... ID of the doubled-clicked contact is sent as a querystring (no postback, ... at the time I insert a new contact into the database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Length of data to decrypt is invalid Rijndael
    ... Something that I noticed is that when if I call Decrypt in the ... encrypt method before returning everything is as expected. ... the encrypted data is sent in the querystring that it fails. ... > applications for the Encryption Library and I get the error "Length of data ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • How do I Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)?
    ... Use DPAPI to Encrypt and Decrypt Data ... The code below demonstrates how to call Data Protection API (DPAPI) ... In addition to encryption and decryption, ... public static string Encrypt ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Byte array to string and back - newbie question
    ... // Create a symmetric algorithm. ... This is done to make encryption more ... // Encrypt a string into a string using a password ... // Decrypt a byte array into a byte array using a key and an IV ...
    (microsoft.public.dotnet.framework.aspnet.security)