Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

22 rindas
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. });