473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Querystring Encryption

Hi.

I am trying to encrypt some data being passed between two
aspx pages using querystring. I have tried bith DES and
Rijndael and have run across the following problem.
After either provider encrypts the data I URL encode the
data. Once the data makes it to the next page I URL
decode the data prior to decrypting it.

The problem occurs when the original encryption includes
the + sign. The URL decode assumes this was put there by
the URL encode and replaces it with a space which causes
the decryption to fail. I have worked around this by
replacing any spaces with + prior to decryption.
However, this doesn't seem like an ideal solution as
there might be other characters that might be decoded
improperly. Has anyone found a work around for this
other than using basic Base64 encryption?

Thanks in advance for any input.

Nov 21 '05 #1
2 1293
This useful?

http://www.dotnetjunkies.com/HowTo/9...75836DC72.dcik

Greg
"Ryan" <an*******@discussions.microsoft.com> wrote in message
news:22****************************@phx.gbl...
Hi.

I am trying to encrypt some data being passed between two
aspx pages using querystring. I have tried bith DES and
Rijndael and have run across the following problem.
After either provider encrypts the data I URL encode the
data. Once the data makes it to the next page I URL
decode the data prior to decrypting it.

The problem occurs when the original encryption includes
the + sign. The URL decode assumes this was put there by
the URL encode and replaces it with a space which causes
the decryption to fail. I have worked around this by
replacing any spaces with + prior to decryption.
However, this doesn't seem like an ideal solution as
there might be other characters that might be decoded
improperly. Has anyone found a work around for this
other than using basic Base64 encryption?

Thanks in advance for any input.

Nov 21 '05 #2
I saw this site during my research of this problem. I
took a look at it but I'm concerned that it is simply a
wrapper of existing crypto service providers that would
suffer from the same problem.

Thanks for the input

-----Original Message-----
This useful?

http://www.dotnetjunkies.com/HowTo/99201486-ACFD-4607- A0CC-99E75836DC72.dcik
Greg
"Ryan" <an*******@discussions.microsoft.com> wrote in messagenews:22****************************@phx.gbl...
Hi.

I am trying to encrypt some data being passed between two aspx pages using querystring. I have tried bith DES and Rijndael and have run across the following problem.
After either provider encrypts the data I URL encode the data. Once the data makes it to the next page I URL
decode the data prior to decrypting it.

The problem occurs when the original encryption includes the + sign. The URL decode assumes this was put there by the URL encode and replaces it with a space which causes the decryption to fail. I have worked around this by
replacing any spaces with + prior to decryption.
However, this doesn't seem like an ideal solution as
there might be other characters that might be decoded
improperly. Has anyone found a work around for this
other than using basic Base64 encryption?

Thanks in advance for any input.

.

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ian N | last post by:
Hi, I've had to quickly servers and need to turn an ASP script into PHP, i got the original script from: - http://www.4guysfromrolla.com/webtech/012000-1.shtml Does anyone know of a PHP...
3
by: Arjen | last post by:
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...
4
by: Jason Shohet | last post by:
I'm getting a URL w/ a querystring coming in to start my app. In session_start, I was thinking of scrambling that querystring to keep it from prying eyes.... Any ideas? Doesn't need to be...
1
by: Nils N | last post by:
Hi all, Does anyone have a best practice for performring querystring authentication. I am now sending an email with a url to which the user clicks to confirm his or her registration. The url...
2
by: Craig HB | last post by:
I need to pass a variable in a querystring that I want to hide from the user. eg www.abc.com?UserID=555 and the UserID must be hidden. I was thinking of encrypting the ID, using a UserGUID that...
2
by: Ram | last post by:
Hi, I am passing values from one form to another using querystring. It is easy for anyone to tamper these values. Now i don't want to show any values in the url .How can be this done?. I don't...
4
by: Islamegy® | last post by:
I give up.. I tried everything to encrypt querystring and decrypt it back but this never success.. i use RSA encryption. I always get excption when Convert fromBase64String so i tried...
2
by: gandhibasnet | last post by:
Using : System.Web.HttpUtility.UrlEncode() I have used the following code : Response.Redirect("Receive_encrypted_data.aspx?valz="+System.Web.HttpUtility.UrlEncode(TextBox1.Text)); but the...
3
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.