mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-13 12:15:04 +00:00
Entropy defaults to generating a 15 word mnemonic
This commit is contained in:
+1
-1
@@ -157,7 +157,7 @@
|
|||||||
<select class="mnemonic-length form-control">
|
<select class="mnemonic-length form-control">
|
||||||
<option value="raw">From entropy length (3 words per 32 bits)</option>
|
<option value="raw">From entropy length (3 words per 32 bits)</option>
|
||||||
<option value="12">12 Words</option>
|
<option value="12">12 Words</option>
|
||||||
<option value="15">15 Words</option>
|
<option value="15" selected>15 Words</option>
|
||||||
<option value="18">18 Words</option>
|
<option value="18">18 Words</option>
|
||||||
<option value="21">21 Words</option>
|
<option value="21">21 Words</option>
|
||||||
<option value="24">24 Words</option>
|
<option value="24">24 Words</option>
|
||||||
|
|||||||
@@ -2237,6 +2237,7 @@ page.open(url, function(status) {
|
|||||||
// use entropy
|
// use entropy
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
$(".use-entropy").prop("checked", true).trigger("change");
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".mnemonic-length").val("raw");
|
||||||
$(".entropy").val("00000000 00000000 00000000 00000000").trigger("input");
|
$(".entropy").val("00000000 00000000 00000000 00000000").trigger("input");
|
||||||
});
|
});
|
||||||
// check the mnemonic is set and address is correct
|
// check the mnemonic is set and address is correct
|
||||||
@@ -2858,6 +2859,7 @@ page.open(url, function(status) {
|
|||||||
// use entropy
|
// use entropy
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
$(".use-entropy").prop("checked", true).trigger("change");
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".mnemonic-length").val("raw");
|
||||||
});
|
});
|
||||||
var nextTest = function runNextTest(i) {
|
var nextTest = function runNextTest(i) {
|
||||||
function getFeedbackError(expected, actual) {
|
function getFeedbackError(expected, actual) {
|
||||||
@@ -2934,6 +2936,7 @@ page.open(url, function(status) {
|
|||||||
// use entropy
|
// use entropy
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
$(".use-entropy").prop("checked", true).trigger("change");
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".mnemonic-length").val("raw");
|
||||||
var entropy = "00000000 00000000 00000000 00000000";
|
var entropy = "00000000 00000000 00000000 00000000";
|
||||||
entropy += "11111111 11111111 11111111 1111"; // Missing last byte
|
entropy += "11111111 11111111 11111111 1111"; // Missing last byte
|
||||||
$(".entropy").val(entropy).trigger("input");
|
$(".entropy").val(entropy).trigger("input");
|
||||||
@@ -2960,6 +2963,7 @@ page.open(url, function(status) {
|
|||||||
// use entropy
|
// use entropy
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
$(".use-entropy").prop("checked", true).trigger("change");
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".mnemonic-length").val("raw");
|
||||||
var entropy = "";
|
var entropy = "";
|
||||||
// Generate a very long entropy string
|
// Generate a very long entropy string
|
||||||
for (var i=0; i<33; i++) {
|
for (var i=0; i<33; i++) {
|
||||||
@@ -2993,6 +2997,7 @@ page.open(url, function(status) {
|
|||||||
// use entropy
|
// use entropy
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
$(".use-entropy").prop("checked", true).trigger("change");
|
$(".use-entropy").prop("checked", true).trigger("change");
|
||||||
|
$(".mnemonic-length").val("raw");
|
||||||
var entropy = "543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543";
|
var entropy = "543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543";
|
||||||
$(".entropy").val(entropy).trigger("input");
|
$(".entropy").val(entropy).trigger("input");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user