突然想在WP上用MD5 ,c#的MD5方法在SL下是不能用的额

搜索下MSDN,找到解决方法:

http://archive.msdn.microsoft.com/SilverlightMD5

 

下载那两个类添加到工程中,然后添加代码:

string input)
   2: {
byte[] bs = System.Text.Encoding.UTF8.GetBytes(input);
new MD5Managed();
byte[] hash = md5.ComputeHash(bs);
   6:  
new StringBuilder();
in hash)
   9:     {
).ToLower());
  11:     }
return sb.ToString();
  13: }

 

使用的时候调用这个函数就OK了

比如:

));

 

效果:

Sliverlight MD5

相关文章:

  • 2021-07-14
  • 2022-01-13
  • 2021-08-09
  • 2021-12-11
  • 2021-07-03
  • 2021-12-03
  • 2021-10-29
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案