1

Say I have some Form's authentication Cookie:

FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
  "TESTTEST",
  DateTime.Now,
  DateTime.Now.AddMinutes(30),
  false,
  String.Empty,
  FormsAuthentication.FormsCookiePath);

Normally in C# we can decrypt this like so:

var authToken = FormsAuthentication.Decrypt(authCookie.Value);

I'm creating a tool for testing an I want to decrypt the cookie on the client-side.

If my machine key is: GHFDK45sDFGSKj234 How can I decrypt the Authentication from Javascript?

johnny 5
  • 19,893
  • 50
  • 121
  • 195

1 Answers1

1

First you need to know the algorithm that the forms authentication is using. Then you need to find a javascript library that can decrypt that algorithm

Community
  • 1
  • 1
Callback Kid
  • 708
  • 5
  • 22