asp.net MD5加密函数(vb.net)

时间:2006/5/21 16:26:27      阅读:3906          

      利用下面的方法,可直接输入数据,反回md5加密后的代码

 1Public Shared Function MD5(ByVal Sourcein As String) As String 
 2   Dim MD5CSP As MD5CryptoServiceProvider =  New MD5CryptoServiceProvider() 
 3   Dim MD5Source() As Byte =  System.Text.Encoding.UTF8.GetBytes(Sourcein) 
 4   Dim MD5Out() As Byte =  MD5CSP.ComputeHash(MD5Source) 
 5   Return Convert.ToBase64String(MD5Out)
 6End Function

 
评论
  • Re:asp.net MD5加密函数(vb.net)  (2006/8/16 15:22:23) by 飘萍 
        .net自带md5的加密转换方法,这点比asp好多了。
  • Re:asp.net MD5加密函数(vb.net)  (2009/9/16 9:30:13) by 阿貓 

    .net has the easy way to encryption and decryption.  It's a good thing.

  • Re:asp.net MD5加密函数(vb.net)  (2010/3/20 22:24:57) by 婵″倷缍嶆稉瀣祰閻㈤潧濂?Url= 

    确实方便多了

标 题:
 
姓 名:
 
主 页:

验证码:

评论:
 

Because of the cache,you may see your comments several minutes later.