Blowfish in LotusScript
I am finished converting David Ireland’s VBScript version of Blowfish encryption. The code is all David’s. I made two hacks to make it work in LotusScript.
1) LotusScript doesn’t allow for Array building the way VBScript does (this should have been included in R5 let alone R8). In VBScript, an array can be declared by writing Array(1,2,3,4). In LotusScript, I had to declare the array then build it. Take a look at the basblfArrays library and see how many arrays I had to convert (close to 300 lines of code).
2) My other hack was in blf_StringDec function of the basBlowfishFns library. In LotusScript ASC() throws an error if a null string is given. I threw a try/catch around the code.
I also copied David’s example ASP page into a Lotus Notes form so you can see how the code is used.
I could spend some time wrapping it into Object classes and making it a bit more intuitive for us Lotus developers but I will wait until I am happy with the testing.
FYI: I did not rename any of the libraries or functions. As I said… this is David Ireland’s code. Please follow the terms under his Copyright (found in every script library).
Zipped NSF File: LotusScript/Blowfish Database