473,698 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1310
This useful?

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

Greg
"Ryan" <an*******@disc ussions.microso ft.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.dc ik
Greg
"Ryan" <an*******@disc ussions.microso ft.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
6137
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 version of this? otherwise it's gonna be a few hours sifting through it and converting it line by line.
3
2060
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 www.mysite.com/index.aspx?id=123&print=no Must be changed to: www.mysite.com/index.aspx?2342342375675675676756
4
1696
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 fullproof, just quick and dirty :) ty jason shohet
1
1994
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 contains a Guid in the querystring, and this is validated agains the user's uniqueidenfier in the sql server database. How secure is the uniqueidentifer, and should I use a md5 encryption with a seed, or DES encryption instead?
2
1278
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 would change every night, or passing and an array and index and getting the correct UserID from that. Any ideas / suggestions Craig
2
1478
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 want any encryption. Please suggest a solution which can be incorporated in a single file and use across the application . Thanks and Regards, S.Ramalingam.
4
4204
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 HttpUtitlity.UrlEncode() but i got bad data Exception.. Is there anyway to work around this??
2
1321
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 Querystring data is visible in Address bar ? How can i encrypt ?
3
2156
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 must be submitted with a unique key, while everything is the same, these 4 fields must be different.... Idealy, these are the codes. please teach me how to do it. objConn.Open(sConnection) sRowNum = request.querystring("row_num")
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7743
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.