bitmessage-js/test.js

13 lines
474 B
JavaScript
Raw Normal View History

2014-12-13 19:56:14 +01:00
var expect = require("chai").expect;
var bmcrypto = require("./lib/crypto");
2014-12-13 19:56:14 +01:00
describe("Bitmessage crypto", function() {
2014-12-13 19:56:14 +01:00
it("should calculate sha512 hash for both node and browserify", function(done) {
bmcrypto.sha512(new Buffer("test")).then(function(res) {
2014-12-13 19:56:14 +01:00
expect(res.toString("hex")).to.equal("ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff");
done();
});
});
});