Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Wrong md5 on international strings #288

zerodivisi0n opened this Issue May 29, 2011 · 5 comments


None yet
4 participants

When using connect.utils.md5 function to create md5 hash with international string, wrong hash generated.
This is because the encoding used by default is binary, but required utf8.

exports.md5 = function(str, encoding){
  return crypto
    .update(str, 'utf8')
    .digest(encoding || 'hex');

tj commented May 30, 2011

im pretty sure this is only used for the favicon ETag right now


tj commented May 30, 2011

though I do have it as @public haha


jonathanong commented Sep 13, 2013

is this still an issue?


dougwilson commented Oct 15, 2013

It's an issue in that the problem still exists, but not an issue since it's not a public API function and it's internal use doesn't need the extra argument. I'll send a pull request, though, just for argument's sake.

@jonathanong jonathanong closed this in #916 Oct 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment