Coder Social home page Coder Social logo

md5's People

Contributors

davidm avatar fingon avatar garonenur avatar hishamhm avatar mascarenhas avatar mpeterv avatar starwing avatar tieske avatar tomasguisasola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

md5's Issues

make install fail

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.

undefined symbol: lua_settop

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.

about c api

how to use c api? provide some demo please

md5_update behaves differently from other implementations.

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

Insecure cipher warning

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.