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