FormsAuthentication.Encrypt

FormsAuthenticationTicketをクッキーに保存するときに、FormsAuthentication.Encryptで暗号化しておく。

FormsAuthentication.Encrypt(FormsAuthenticationTicket) メソッド (System.Web.Security) | Microsoft Docs

login.aspxで、

暗号化文字列を出してみる。

ログインすると
ログインすると

ログインすると、

長い暗号化文字列になっている
長い暗号化文字列になっている

長い暗号化文字列になっている。

Sample/aspnet/FormsAuthentication/Encrypt/src/FormsAuthentication at master · bg1bgst333/Sample · GitHub