Skip to content

Decrypt Forms Authentication cookies on the .NET Core runtime

License

Notifications You must be signed in to change notification settings

julian-maughan/FormsAuthDecryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FormsAuthentication.Decryptor

NuGet version (FormsAuthentication.Decryptor)

A library to decrypt Forms Authentication cookies on the .NET Core runtime. Typically these cookies are created on older/legacy ASP.NET applications running .NET Framework, but may need to be decrypted/validated in a cloud or serverless context running .NET Core, e.g. AWS Lambda.

Notes

  • At the time of writing, .NET Core 2.1 does not include the APIs for decrypting FormsAuthentication cookies. However, Microsoft has open-sourced .NET Framework, allowing us to easily port the code to .NET Core.

  • This version supports AES (for decryption) and HMAC256/384/512 (hashing).

  • It can decode Forms Auth cookies created for MachineKeyCompatibilityMode.Framework45 and above.

  • The code is unchanged from the original version except:

    • Unused methods removed
    • Removed code for encryption - e.g. NetFXCryptService.Protect(...) method - leaving only decryption code
    • Some comments removed
  • The code has been released by Microsoft under the MIT license.

About

Decrypt Forms Authentication cookies on the .NET Core runtime

Topics

Resources

License

Stars

Watchers

Forks

Languages