Use hash.js for SHA-512

This commit is contained in:
Kagami Hiiragi 2015-01-06 02:45:16 +03:00
parent 3187e9d766
commit 96ba6b0fad
2 changed files with 3 additions and 5 deletions

View File

@ -4,11 +4,10 @@
"use strict"; "use strict";
var createHash = require("sha.js");
var hash = require("hash.js"); var hash = require("hash.js");
exports.sha512 = function(buf) { exports.sha512 = function(buf) {
return createHash("sha512").update(buf).digest(); return new Buffer(hash.sha512().update(buf).digest());
}; };
exports.sha256 = function(buf) { exports.sha256 = function(buf) {

View File

@ -49,8 +49,7 @@
"bs58": "^2.0.0", "bs58": "^2.0.0",
"buffer-equal": "~0.0.1", "buffer-equal": "~0.0.1",
"eccrypto": "^0.1.2", "eccrypto": "^0.1.2",
"hash.js": "^0.3.2", "hash.js": "^1.0.2",
"object.assign": "^1.1.1", "object.assign": "^1.1.1"
"sha.js": "^2.3.0"
} }
} }