md5 小试

MD5 md5 = MD5.Create();
byte[] bytes = Encoding.UTF8.GetBytes(obj.UserPwd);
byte[] md5Bytes = md5.ComputeHash(bytes);
StringBuilder sb = new StringBuilder();
foreach (byte b in md5Bytes)
{
sb.Append(b.ToString("x2"));
}

posted @ 2022-08-01 10:34  误人子弟的半吊子  阅读(30)  评论(0编辑  收藏  举报