From the link:
Sub test()
Dim md5Hash As MD5
Set md5Hash = New MD5
Debug.Print "MD5", md5Hash.MD5("Kyle")
Dim sha256Hash As SHA256
Set sha256Hash = New SHA256
Debug.Print "SHA256", sha256Hash.SHA256("Kyle")
End Sub
Outputs:
MD5 e8b579fe36f15209c6f167396a46b04e
SHA256 b9ecfab5789d7b96f8765c147fff488e9946ede2797a4ec149c2cc5b35054799
Which is correct, to use, simply download the sha256 & md5 zips, extract the cls files and copy and paste each into a new class module (you could import them too). Copy down from the beginning of the starred comment line (you don't need the stuff before). I've called the classes MD5 and SHA256 in the above, but you may name them whatever you like.
Or since this works quite neatly with an interface, I'd be tempted to (knock one up and) simply use:
Sub test()
Dim hash As IHash
Set hash = New MD5
Debug.Print "MD5", hash.hash("Kyle")
Set hash = New SHA256
Debug.Print "SHA256", hash.hash("Kyle")
End Sub
Bookmarks