Skip to content

Commit 039d2dc

Browse files
committed
removed old radix 26 alphabet default and added static final to two constants
1 parent 155bfb4 commit 039d2dc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/com/privacylogistics/FF3Cipher.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,6 @@ protected static String alphabetForBase(int base) {
565565
switch (base) {
566566
case 10:
567567
return DIGITS;
568-
case 26:
569-
// used by NIST test vectors but deprecated in constructor
570-
// return DIGITS + "abcdefghijklmnop";
571568
case 36:
572569
return DIGITS + ASCII_UPPERCASE;
573570
case 62:
@@ -583,12 +580,12 @@ protected static String alphabetForBase(int base) {
583580
private static final int TWEAK_LEN = 8; // Original FF3 64-bit tweak length
584581
private static final int TWEAK_LEN_NEW = 7; // FF3-1 56-bit tweak length
585582
private static final int HALF_TWEAK_LEN = TWEAK_LEN/2;
586-
private static int MAX_RADIX = 256;
583+
private static final int MAX_RADIX = 256;
587584
private static final Logger logger = LogManager.getLogger(FF3Cipher.class.getName());
588585

589586
/** The recommendation in Draft SP 800-38G was strengthened to a requirement in Draft SP 800-38G Revision 1:
590587
the minimum domain size for FF1 and FF3-1 is one million */
591-
public static int DOMAIN_MIN = 1000000; // 1M
588+
public static final int DOMAIN_MIN = 1000000; // 1M
592589
public static final String DIGITS = ("0123456789");
593590
public static final String ASCII_LOWERCASE = ("abcdefghijklmnopqrstuvwxyz");
594591
public static final String ASCII_UPPERCASE = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

0 commit comments

Comments
 (0)