您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

C# 计算MD5哈希字符串

2025/12/30 18:56:50发布26次查看
c# 计算md5哈希字符串
public static string calculatemd5hash(string input) { // step 1, calculate md5 hash from input var md5 = md5.create(); byte[] inputbytes = encoding.ascii.getbytes(input); byte[] hash = md5.computehash(inputbytes); // step 2, convert byte array to hex string var sb = new stringbuilder(); for (int i = 0; i < hash.length; i++) { sb.append(hash[i].tostring("x2")); } return sb.tostring(); }
以上就是c# 计算md5哈希字符串的内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product