I had a need for a hashing function (mostly just to generate random looking data) in Excel. I ran across this one for SHA1 and though that it would be good to save it somewhere I could find it again.
X = SHA1HASH(str)
This needs to be inserted into a new module for Excel (or Word or any other VBA application). If using in a VBScript or other utility, just include the content.