Skip to content

Instantly share code, notes, and snippets.

@theotow
Created January 23, 2014 11:22
Show Gist options
  • Select an option

  • Save theotow/8577001 to your computer and use it in GitHub Desktop.

Select an option

Save theotow/8577001 to your computer and use it in GitHub Desktop.
binary md5 hashing in nodejs
var md5 = crypto.createHash('md5').update(string).digest('binary');
md5 = new Buffer(md5, "binary").toString('base64');
@hi-too
Copy link

hi-too commented Mar 2, 2017

Well Done!

@GuimDev
Copy link

GuimDev commented Jun 11, 2018

    const md5 = crypto.createHash('md5').update(string, "binary").digest('base64');

It's maybe better.

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