Bitwise and Hashing Extension

Share your scripts and packages with other Mudlet users.
Post Reply
Zanthis
Posts: 23
Joined: Mon Dec 09, 2013 8:35 pm

Bitwise and Hashing Extension

Post by Zanthis »

Since I'm hashing things, and Mudlet isn't using Lua 5.2, I ported over some pure Lua bitwise functions and SHA2 hashing into a package and figured I'd share it. Performance seems pretty reasonable actually. I've been hashing room descriptions and I don't get any noticeable performance hit.

I did minimal actually coding on these functions. All I did was port and test. If anyone sees a problem with them, let me know.

Just download the ZIP file and install it from the Mudlet package manager. Functions are in the BHExt namespace, divided into Bit, Bit32 and SHA2 sections for LuaBitOp bitwise operators, Lua 5.2 bitwise operators, and SHA2 hashing functions respectively.
Attachments
Bitwise and Hashing Extension.zip
(4.53 KiB) Downloaded 470 times

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: Bitwise and Hashing Extension

Post by Vadi »

Lua's performance is amazing.

Thanks for the library, I just happened to neet bitwise extensions now!

Post Reply