Use hash.js for SHA-512
This commit is contained in:
parent
3187e9d766
commit
96ba6b0fad
|
@ -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) {
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user