CAPICOM provides MDx and SHA1 hashing easily accessible from VBA
here is SHA1 late-binding
Public Function Hash(ByVal strPlainText As String) As String
Dim obHash As Object
On Error GoTo err_Hash
Set obHash = CreateObject("CAPICOM.HashedData")
obHash.Algorithm = 0 'that's SHA1 - see CAPICOM documentation for MDx
obHash.Hash strPlainText
Hash = obHash.Value
exit_Hash:
strPlainText = ""
Set obHash = Nothing
Exit Function
err_Hash:
MsgBox Err.Number & ": " & Err.Description, vbInformation, "Hash error"
Hash = ""
Resume exit_Hash
End Function
you need CAPICOM on the machine...normally it's there already, else it's freely downloadable from M$
izy