SHA1/MD5 Hash Libraries for LotusScript
Jason Molzen contacted me this weekend asking for help generating MD5 hashes in LotusScript. I had previously posted a HMAC SHA1 library that was an amalgamation of two developers’ (Paul Johnston and Julian Robichaux) code. Paul did not mind me converting the SHA1 code so I spent a lot of time translating the MD5 script he created.
With Jason’s help I converted Paul Johnston’s MD5 script but I wasn’t quite happy when I finished the library. The code was written as functions and it was hard to figure out what to use to create each hash.
I finally ended up with three script libraries. Click on the links to download the “lss” library files.
- CoreHashLibrary - Contains one class called HashHelper (I loved using the word “Hash”). It contains a lot of the binary functions for processing these hashes.
- MD5 - Self explanatory. This contains two classes: a MD5 class with a New(text) constructor and a HMAC_MD5 class with a New(key,text) constructor
- SHA1 - Self explanatory. This contains two classes: a SHA1 class with a New(text) constructor and a HMAC_SHA1 class with a New(key,text) constructor
Jason sent a link to a great tool for testing these hashes: HashCalc. Previously, I had been testing the hashes with Paul Johnston’s javascript but HashCalc saved me a lot of time.

Comments: