您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

entropy.test.js 304 B

123456789
  1. const assert = require("assert");
  2. const bigInt = require("big-integer");
  3. const entropy = require("../src/entropy");
  4. test("consumeEntropy", () => {
  5. const password = entropy.consumeEntropy("", bigInt(4 * 4 + 2), "abcd", 2);
  6. assert.equal("ca", password.value);
  7. assert.equal(1, password.entropy);
  8. });