pvorb/node-md5

Value produced differs from that generated on bash??

ekkis opened this issue · 1 comments

ekkis commented
$ echo test |md5
d8e8fca2dc0f896fd7cb4cb0031ba249
$ node -e "md5=require('md5'); console.log(md5('test'));"
098f6bcd4621d373cade4e832627b4f6

how can that be?

ekkis commented

ok, I'm being stupid. echo outputs a carriage return, so printf "test" |md5 works as expected