25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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