Option Explicit
Sub Convertir()
Dim Cel As Range, Plage As Range
Set Plage = Range([A1], Range("A" & Rows.Count).End(xlUp))
Columns(2).Clear
For Each Cel In Plage
Cel.Offset(, 1) = MD5Hash(Cel)
Next Cel
End Sub
Public Function MD5Hash(ByVal strText As String) As String
' Create and return MD5 signature from strText.
' Signature has a length of 32 characters.
' 2005-11-21. Cactus Data ApS, CPH.
Dim cMD5 As New clsMD5
Dim strSignature As String
' Calculate MD5 hash.
strSignature = cMD5.MD5(strText)
' Return MD5 signature.
MD5Hash = strSignature
Set cMD5 = Nothing
End Function
Public Function IsMD5(ByVal strText As String, ByVal strMD5 As String) As Boolean
' Checks if strMD5 is the MD5 signature of strText.
' Returns True if they match.
' Note: strText is case sensitive while strMD5 is not.
' 2005-11-21. Cactus Data ApS, CPH.
Dim BooMatch As Boolean
BooMatch = (StrComp(strMD5, MD5Hash(strText), vbTextCompare) = 0)
IsMD5 = BooMatch
End Function