net sha256加密 base64编码

byte[] SHA256Data = Encoding.UTF8.GetBytes(sign_origin.ToString());
var Sha256 = new SHA256Managed();
byte[] Result = Sha256.ComputeHash(SHA256Data);
sign = Convert.ToBase64String(Result);

 

posted @ 2023-06-08 08:56  天天的蓝色  阅读(119)  评论(0编辑  收藏  举报