HashPasswordForStoringInConfigFile 已過時
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile
已過時的更新方案筆記 (MD5 & SHA1)
引用
using System.Security.Cryptography;
SHA1
BitConverter.ToString(SHA1.Create().ComputeHash(Encoding.UTF8.GetBytes(str)))
.Replace("-", null);
MD5
BitConverter.ToString(MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(str)))
.Replace("-", null);
參照 SHA1 類別

PS5
.NET Framework
C#
回首頁
本文章從點部落遷移至 Writerside
13 October 2025