lunarmodules / md5 Goto Github PK
View Code? Open in Web Editor NEWMD5 offers basic cryptographic facilities for Lua 5.1.
Home Page: https://lunarmodules.github.io/md5/
MD5 offers basic cryptographic facilities for Lua 5.1.
Home Page: https://lunarmodules.github.io/md5/
luaL_setfuncs
in src/compat-5.2.c
doesn't work if nups
> 0. See keplerproject/lua-compat-5.2@adf9db4a5. Currently you don't need upvalues for this module, so this is not a pressing issue ...
Please provide a download archive tarball/zipball, either in tags or downloads.
As I understand it, the current Version is 1.2?
there is some mention of 1.1.2, most prominent in the README.md which is the first thing a user of github sees.
I think lines 25 and 26 in Makefile should be swapped:
install: src/$(MD5_LIBNAME) src/$(DES56_LIBNAME)
cp src/$(DES56_LIBNAME) $(LUA_LIBDIR)
mkdir -p $(LUA_LIBDIR)/md5
cp src/$(MD5_LIBNAME) $(LUA_LIBDIR)/md5/
mkdir -p $(LUA_DIR)
cp $(MD5_LUAS) $(LUA_DIR)
Otherwise copy operation for $(DES56_LIBNAME)
may attempt to place it in a non-existent directory causing the whole make install
to fail.
Hello,
Currently I'm trying to setup cgit to use libravatar using lua script and one of the dependency is this lua md5. However, when I used it with my cgit instance I got error:
fatal: Lua error in /usr/local/lib64/cgit/filters/email-libravatar-korg.lua: error loading module 'md5.core' from file '/usr/local/lib64/lua/5.1/md5/core.so':
/usr/local/lib64/lua/5.1/md5/core.so: undefined symbol: lua_settop
Below is my lua script to access the libravatar:
local md5 = require("md5")
function filter_open(email, page)
buffer = ""
hexdigest = md5.sumhexa(email:sub(2, -2):lower())
end
function filter_close()
html("<span class='libravatar'><img class='inline' src='//seccdn.libravatar.org/avatar/" .. hexdigest .. "?s=13&d=retro' /><img class='onhover' src='//seccdn.libravatar.org/avatar/" .. hexdigest .. "?s=128&d=retro' /></span>" .. buffer)
return 0
end
function filter_write(str)
buffer = buffer .. str
end
My Lua version is 5.1.5
Please kindly help what is wrong with my setup?
Thank you.
how to use c api? provide some demo please
md5_init(m);
md5_update(m, "hello", strlen("hello"));
md5_update(m, "world", strlen("world"));
md5_finish(m, hash);
hash: a48b171ee450c14dab8e7162cdce3f8d
md5_init(m);
md5_update(m, "helloworld", strlen("helloworld"));
md5_finish(m, hash);
hash: fc5e038d38a57032085441e7fe7010b0
In Python or other C implementations, eg RFC 1321
hash_md5 = hashlib.md5()
hash_md5.update("hello")
hash_md5.update("world")
print(hash_md5.hexdigest())
hash: fc5e038d38a57032085441e7fe7010b0
hash_md5 = hashlib.md5()
hash_md5.update("helloworld")
print(hash_md5.hexdigest())
hash: fc5e038d38a57032085441e7fe7010b0
This library provides two ways to encrypt and decrypt data: one "based on MD5 and CFB" and the other one "based on DES with 56-bit keys". MD5 is not used in any symmetric cipher commonly accepted as secure and DES has been known to be insecure since at least 2001. While this library may still be useful for legacy reasons, would you consider adding a warning in your documentation and readme so that users don't mistakenly think this library provides them with secure ciphers?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.