QueryString encryption

A

Arjen

Hello,

Can somebody tell my if it is posible to create a QueryString
encryption/decryption that works from a higher level then the code view...

For example:
I have an URL like www.mysite.com/index.aspx?id=123&print=no
Must be changed to:
www.mysite.com/index.aspx?2342342375675675676756

Now I know that there are solutions that can encrypt and decrypt the
QueryString.
But the encryption and decryptions must you do in the code, inside the aspx
pages.

What I what is a sort of filter which scans all URL's (incomming and
outcomming) and automatily encrypt and decrypt the QueryString (or only when
the pagename is default.aspx). This means that I don't have to code each
time the QueryString.

Is something like this posible? Does it exist? Can you give me some example
code?

Thanks!
 
H

Hermit Dave

dont think so...
what i would say is create a generic lib.. .say using Des3 or Rijndael and
expose two methods... encrypt and decrypt...
take a string.. encrypt it and return a Base64string of the resulting byte[]

and the other way around... you will probably have to store the key and init
vec somewhere.. if you choose to store in your lib... try and make it more
secure by using dotfuscator and string encryption in it....

yes you will have to encrypt and decrypt manually.. and possibly parsing the
data cause you will get a resuting.. key value string..and you wont be able
to use Request["param"] to fetch the value.

hth

--
Regards,

HD

Once a Geek.... Always a Geek
 
A

Arjen

Is there a way to do this with httphandlers?

Thanks!
Arjen



Hermit Dave said:
dont think so...
what i would say is create a generic lib.. .say using Des3 or Rijndael and
expose two methods... encrypt and decrypt...
take a string.. encrypt it and return a Base64string of the resulting byte[]

and the other way around... you will probably have to store the key and init
vec somewhere.. if you choose to store in your lib... try and make it more
secure by using dotfuscator and string encryption in it....

yes you will have to encrypt and decrypt manually.. and possibly parsing the
data cause you will get a resuting.. key value string..and you wont be able
to use Request["param"] to fetch the value.

hth

--
Regards,

HD

Once a Geek.... Always a Geek
Arjen said:
Hello,

Can somebody tell my if it is posible to create a QueryString
encryption/decryption that works from a higher level then the code view...

For example:
I have an URL like www.mysite.com/index.aspx?id=123&print=no
Must be changed to:
www.mysite.com/index.aspx?2342342375675675676756

Now I know that there are solutions that can encrypt and decrypt the
QueryString.
But the encryption and decryptions must you do in the code, inside the aspx
pages.

What I what is a sort of filter which scans all URL's (incomming and
outcomming) and automatily encrypt and decrypt the QueryString (or only when
the pagename is default.aspx). This means that I don't have to code each
time the QueryString.

Is something like this posible? Does it exist? Can you give me some example
code?

Thanks!
 
M

mikeb

Arjen said:
Is there a way to do this with httphandlers?

I think what you want is an HttpModule:

http://msdn.microsoft.com/msdnmag/issues/02/05/asp/
Thanks!
Arjen



dont think so...
what i would say is create a generic lib.. .say using Des3 or Rijndael and
expose two methods... encrypt and decrypt...
take a string.. encrypt it and return a Base64string of the resulting
byte[]

and the other way around... you will probably have to store the key and
init

vec somewhere.. if you choose to store in your lib... try and make it
more

secure by using dotfuscator and string encryption in it....

yes you will have to encrypt and decrypt manually.. and possibly parsing
the

data cause you will get a resuting.. key value string..and you wont be
able

to use Request["param"] to fetch the value.

hth

--
Regards,

HD

Once a Geek.... Always a Geek
Hello,

Can somebody tell my if it is posible to create a QueryString
encryption/decryption that works from a higher level then the code
view...
For example:
I have an URL like www.mysite.com/index.aspx?id=123&print=no
Must be changed to:
www.mysite.com/index.aspx?2342342375675675676756

Now I know that there are solutions that can encrypt and decrypt the
QueryString.
But the encryption and decryptions must you do in the code, inside the
aspx

pages.

What I what is a sort of filter which scans all URL's (incomming and
outcomming) and automatily encrypt and decrypt the QueryString (or only
when

the pagename is default.aspx). This means that I don't have to code each
time the QueryString.

Is something like this posible? Does it exist? Can you give me some
example

code?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top