C# SHA256+BASE64
資料來源: https://dotblogs.com.tw/mrsunboss/2013/04/07/99955#SHA256
SHA256 sha256 = new SHA256CryptoServiceProvider();//建立一個SHA256
byte[] source = Encoding.Default.GetBytes(input.Text);//將字串轉為Byte[]
byte[] crypto = sha256.ComputeHash(source);//進行SHA256加密
string result = Convert.ToBase64String(crypto);//把加密後的字串從Byte[]轉為字串
Response.Write(“SHA256加密: ” + result);//輸出結果