Public Function CheckMD5Hash(ByVal OriginalHash As Byte(), _
ByVal Text As String) As Boolean
' Checks an MD5 hash against the specified Text
' Returns True if we have a match
On Error Resume Next
Dim objAscii As New System.Text.ASCIIEncoding()
Dim intCount As Integer, blnMismatch As Boolean
Dim bytHashToCompare As Byte() = GetMD5Hash(Text)
If OriginalHash.Length <> bytHashToCompare.Length Then
Return False
Else
For intCount = 0 To OriginalHash.Length
If OriginalHash(intCount) <> bytHashToCompare(intCount) Then
Return False
End If
Next
Return True
End If
End Function
Please SUBSCRIBE to get new articles directly into your Email inbox!
ByVal Text As String) As Boolean
' Checks an MD5 hash against the specified Text
' Returns True if we have a match
On Error Resume Next
Dim objAscii As New System.Text.ASCIIEncoding()
Dim intCount As Integer, blnMismatch As Boolean
Dim bytHashToCompare As Byte() = GetMD5Hash(Text)
If OriginalHash.Length <> bytHashToCompare.Length Then
Return False
Else
For intCount = 0 To OriginalHash.Length
If OriginalHash(intCount) <> bytHashToCompare(intCount) Then
Return False
End If
Next
Return True
End If
End Function
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق