Skip to content

Instantly share code, notes, and snippets.

@astur astur/sha256.js
Created Apr 11, 2016

Embed
What would you like to do?
Easy sha256-for-object module
var crypto = require('crypto');
module.exports = function (obj){
var str = JSON.stringify(obj);
return crypto.createHash('sha256').update(str).digest('base64');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.