Moved BIP0039 to text gram5 and added word enum
This commit is contained in:
parent
540e204c80
commit
4e9ef6742e
|
@ -53,6 +53,7 @@ import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashX;
|
||||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY;
|
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY;
|
||||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ;
|
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotAMD0110DashSA;
|
import org.x4o.fc18.cake2.gram5.FCDotAMD0110DashSA;
|
||||||
|
import org.x4o.fc18.cake2.gram5.FCDotBIP0039Dash2K;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotBMW0102DashS2;
|
import org.x4o.fc18.cake2.gram5.FCDotBMW0102DashS2;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotDNA0104DashS4;
|
import org.x4o.fc18.cake2.gram5.FCDotDNA0104DashS4;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotIBM1616DashH8;
|
import org.x4o.fc18.cake2.gram5.FCDotIBM1616DashH8;
|
||||||
|
@ -250,7 +251,7 @@ public enum FourCornerDotCake {
|
||||||
/// Burroughs Informative Passwords, 2048 from a random 0039 seed sheet.
|
/// Burroughs Informative Passwords, 2048 from a random 0039 seed sheet.
|
||||||
/// You only need one "word" and the terminator pie "curve" type for the grow factors and an "offset" number.
|
/// You only need one "word" and the terminator pie "curve" type for the grow factors and an "offset" number.
|
||||||
/// That allows a start point in nowhere which than creates 12 or 24 or many more BIP secure number fragments.
|
/// That allows a start point in nowhere which than creates 12 or 24 or many more BIP secure number fragments.
|
||||||
FC_BIP0039_2K(2048, 2048, "Burroughs Informative Passwords"),
|
FC_BIP0039_2K(2048, 2048, FCDotBIP0039Dash2K.values(), "Burroughs Informative Passwords"),
|
||||||
|
|
||||||
// =========== Allow FileName/Variable/Class/Method/etc/etc to spelled correctly in any language
|
// =========== Allow FileName/Variable/Class/Method/etc/etc to spelled correctly in any language
|
||||||
|
|
||||||
|
@ -441,7 +442,7 @@ public enum FourCornerDotCake {
|
||||||
if (idx <= FC_PIE9D_27.ordinal()) {
|
if (idx <= FC_PIE9D_27.ordinal()) {
|
||||||
return FourCornerDotCakeTower.PIE_RIGHT;
|
return FourCornerDotCakeTower.PIE_RIGHT;
|
||||||
}
|
}
|
||||||
if (idx <= FC_OCE0864_H9.ordinal()) {
|
if (idx <= FC_BIP0039_2K.ordinal()) {
|
||||||
return FourCornerDotCakeTower.TXT_GRAMS;
|
return FourCornerDotCakeTower.TXT_GRAMS;
|
||||||
}
|
}
|
||||||
if (idx <= FC_EXTRA_1100.ordinal()) {
|
if (idx <= FC_EXTRA_1100.ordinal()) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2014, Willem Cazander
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
|
* that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||||
|
* following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
|
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||||
|
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||||
|
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package org.x4o.fc18.cake2.gram5;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests FCDotCDC1604DashP6 encoding.
|
||||||
|
*
|
||||||
|
* @author Willem Cazander
|
||||||
|
* @version 1.0 Dec 30, 2024
|
||||||
|
*/
|
||||||
|
public class FCDotBIP0039Dash2KTest {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
if (args.length == 0) {
|
||||||
|
System.err.println("No argument file given");
|
||||||
|
System.exit(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
File wordFile = new File(args[0]);
|
||||||
|
List<String> words = Files.readAllLines(wordFile.toPath());
|
||||||
|
for (String word : words) {
|
||||||
|
String wordEnum = word.toUpperCase();
|
||||||
|
System.out.println("\t" + wordEnum + ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testValues() throws Exception {
|
||||||
|
Assertions.assertEquals(2048, FCDotBIP0039Dash2K.valuesLength());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue