Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > FormsAuthentication.Encrypt and Decrypt

Reply
Thread Tools

FormsAuthentication.Encrypt and Decrypt

 
 
Mike
Guest
Posts: n/a
 
      09-01-2005
We want to use FormsAuthenticationTickets as part of our ASP.NET security.
The current design stores the user's ticket in the db, and later uses the
ticket to extract other data from the database. When the user logs out, we
use the ticket to delete the ticket from the db, using the encrypted ticket
as the key.

Problem is, the tickets don't seem to match between being encrypted and then
decrypted. For example, the following returns two totally different results.

string encryptedTicket = FormsAuthentication.Encrypt(ticket);
System.Diagnostics.Debug.WriteLine(encryptedTicket );
FormsAuthenticationTicket anotherTicket =
FormsAuthentication.Decrypt(encryptedTicket);
encryptedTicket = FormsAuthentication.Encrypt(anotherTicket);
System.Diagnostics.Debug.WriteLine(encryptedTicket );

The two debugs product totally different results. This totally blows our
design. Why don't they match?

Thanks
Mike

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
decrypt challenge - perl encrypt with ruby decrypt aktxyz@gmail.com Ruby 1 06-16-2007 01:30 PM
how to encrypt a C data and write a bin file and read a bin at run time and decrypt C data sweety C Programming 9 02-07-2006 05:28 PM
FormsAuthentication.Encrypt and Decrypt not playing nicely =?Utf-8?B?TWlrZQ==?= ASP .Net 0 08-31-2005 07:59 PM
Can you encrypt and decrypt CDs and CDRWs ? Allen Computer Support 0 10-20-2004 08:14 AM
I need crypt and decrypt basic sample skech ASP .Net 3 12-04-2003 01:32 PM



Advertisments