Is there a pure lua implementation of the md5 hashing algorithm? One that doesn't rely on any c or external libraries? There's javascript implementations that don't rely on c or anything, so it ought to be possible with lua. Thanks!
相关问题
- How to get the return code of a shell script in lu
- facebook error invalid key hash for some devices
- Change first key of multi-dimensional Hash in perl
- Accessing Light userdata in Lua
- Bool.hashValue valid to convert to Int?
相关文章
- Bcrypt vs Hash in laravel
- What is the fastest way to map group names of nump
- Finding out whether there exist two identical subs
- Oracle STANDARD_HASH not available in PLSQL?
- Looking for a fast hash-function
- Lua Integer type
- Python: Is there any reason *not* to cache an obje
- C# how to calculate hashcode from an object refere
I combined the mentioned lua MD5 library that required bitlib and added in LuaBit to make it a pure lua implementation.
As an additional benefit it's structured in such a way that it will work inside of the redis lua scripting environment.
Please note that it is extremely slow compared to other non pure lua based implementations.
It is available in this gist.
There's an old one here but it requires bitlib.
I've refined @Adam Baldwin's solution and made a library that calculates md5 sums in pure Lua, with no external dependencies and no C:
https://github.com/kikito/md5.lua
Summary of changes:
md5.sum
andmd5.sumhex
, that work exactly like their counterparts in the Kepler library, but are implemented in Lua alone.For now I don't need
md5.crypt
andmd5.decrypt
, so I have not implemented those. But I will accept pull requests :)http://equi4.com/md5/md5calc.lua but that still requires a lib.