VB.NET中的MD5解密器

问题描述:

大家好.....下面的代码...我成功加密了文本,但是我的问题是...我无法创建这种反过来....我的意思是"DECRYPTER". ..请帮助……这是我的代码....



Hi guys..... with this codes below... i successfully encryt text but my problem is... i can''t create a vice versa of this.... i mean a "DECRYPTER"... Please Help...... here''s my code....



Public Function pwdMd5Hash(ByVal String2Hash As String) As String

      Try

          Dim MD5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()



          Dim oEncoder As New System.Text.ASCIIEncoding()

          Dim bytes As Byte() = oEncoder.GetBytes(String2Hash)



          Dim myHash As Byte() = MD5Hasher.ComputeHash(bytes)

          Dim myCapacity As Integer = 7

          Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder(myCapacity)

          Dim I As Integer

          For I = 0 To myHash.Length - 1

              sb.Append(BitConverter.ToString(myHash, I, 1))

          Next I

          Return sb.ToString().TrimEnd(New Char() {" "c})

      Catch ex As Exception

          Return "0"

      End Try

正如Wes所说,哈希仅以一种方式发生.您不能将哈希返回到起始字符串.
As Wes said, a hash only goes one way. You can''t turn a hash back in to the starting string.


考虑到MD5并不是一种加密算法,而是一种哈希函数(实际上是一个哈希函数). ,没有像MD5的解密器那样的东西.
Considering that MD5 is not an encryption algorithm, but is in fact a hash function (and a broken one at that), no there is no such thing as a decryptor for MD5.