473,324 Members | 2,248 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,324 software developers and data experts.

Cookie Encryption

Hi,

How do I encrypt information for storing in cookies? I used the MD5, but I
don't know how to decrypt information.
Can you help me?

Rodrigo M. Ferreira

Aug 19 '08 #1
2 1632
"Rodrigo m. Ferreira" <ro**************@ufrgs.brwrote in message
news:BD**********************************@microsof t.com...
Hi,

How do I encrypt information for storing in cookies? I used the MD5, but I
don't know how to decrypt information.
Can you help me?

Rodrigo M. Ferreira
Guess what ... if you used MD5 to encrypt then you can not decrypt it ...

MD5 is not encryption. It's a hashing algorithm.. It works best with
passwords.

Simple example of hashing algorithm - length of the string.

Let say you have password "TEST" the hash value is 4. So I keep 4 in my
database. Next time you come to the website I am asking you for the
password. You enter "TEST" I get it's hash value 4 and compare it with
database. It's the same you in.

If you do not know password and enter "PASSWORD" I get hash value 7 and it
does not match my database record. Hence access denied.

1. No one knows the password. So nobody, even Database admin can pretend to
be you.
2. more than one password can generate same hash value... Hence inability to
reverse it.

Obviously in our case to many passwords generate the same hash value. So use
MD5 and not my favorite string's length hashing algorithm...:)

PS: Check out this article if you still want to use MD5
http://www.codeproject.com/KB/database/md5sql2000.aspx

Aug 19 '08 #2
On Aug 19, 2:34 am, "Rodrigo m. Ferreira" <rodrigo.ferre...@ufrgs.br>
wrote:
Hi,

How do I encrypt information for storing in cookies? I used the MD5, but I
don't know how to decrypt information.
Can you help me?

Rodrigo M. Ferreira
Try this:
http://www.developerfusion.co.uk/show/4647/4/
Aug 19 '08 #3

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

Similar topics

4
by: Derick Bailey | last post by:
I have a development website running on Win2K Server, using ASP 3.0. I'm using IE6 (all updates added). I have a cookie that is set on a login page, which is an Encrypted password:...
4
by: Shabam | last post by:
I'm developing an application and want to have the "remember me" feature, so that users don't have to log back in again in the next visit. The problem here is, what happens if the user's cookie...
9
by: Don | last post by:
I understand that when I send a cookie in a client-side page containing JS, it isn't actually "set" until the next page is loaded. Is there some way to "set" it within the same html/JS page so it...
1
by: Paul W | last post by:
Hi - I'm doing simple XOR encryption on a password before storing it in a cookie. I use the same 2-way encryption/decryption routine at each end (before writing/after reading). Something is getting...
4
by: craigkenisston | last post by:
I have an asp.net application in which I sometimes store a persistent cookie once the user has logged in and this has been working great. However, I now add some user information like, username,...
4
by: gl | last post by:
I'm currently making a web app that stores a user id in a cookie, and builds user information off of that in the differnt pages of the site. The cookie is created on login, and is separate from the...
0
by: Chris Newby | last post by:
I'm looking for a way to transparently encrypt cookie data using Asp.Net 1.1. Ideally, developers could still do things like: HttpCookie cookie = new HttpCookie( "clearTextKey",...
2
by: quintesv via DotNetMonster.com | last post by:
Hi all, On WinXP, VS 2003, .net 1.1 I have written an encryption class which uses rijndael method to encrypt a string AND then convert the string to unicode using System.Text. Unicodeencoder....
4
by: Jon Slaughter | last post by:
Anyone know where I can find info on the cookie spec? I seem to be having a problem(after hours of narrowing it down) where I am using some special characters that are not allowed in a cookie name...
7
by: Walter Sobchak | last post by:
The connection is ssl encrypted and I need to write some sensitive information in a cookie. I'd like to encrypt the cookie on the client so it could be decrypted later on the server. 1. If I use...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.