You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
615 B

  1. var assert = require("assert");
  2. var createHmac = require("../src/hmac");
  3. describe("hmac", function() {
  4. it("createHmac", function() {
  5. return createHmac("sha256", "password").then(function(fingerprint) {
  6. assert.equal(
  7. "e56a207acd1e6714735487c199c6f095844b7cc8e5971d86c003a7b6f36ef51e",
  8. fingerprint
  9. );
  10. });
  11. });
  12. it("createHmac and update", function() {
  13. return createHmac("sha256", "password", "salt").then(function(fingerprint) {
  14. assert.equal(
  15. "fc328232993ff34ca56631e4a101d60393cad12171997ee0b562bf7852b2fed0",
  16. fingerprint
  17. );
  18. });
  19. });
  20. });