forked from I2P_Developers/i2p.i2p
Consolidate base64 alphabet string
This commit is contained in:
@ -39,6 +39,7 @@ import java.util.Locale;
|
||||
*/
|
||||
public class Base64 {
|
||||
|
||||
|
||||
//private final static Log _log = new Log(Base64.class);
|
||||
|
||||
/**
|
||||
@ -134,18 +135,14 @@ public class Base64 {
|
||||
(byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7',
|
||||
(byte) '8', (byte) '9', (byte) '+', (byte) '/'};
|
||||
|
||||
/**
|
||||
* The I2P Alphabet.
|
||||
* @since 0.9.29
|
||||
*/
|
||||
public static final String ALPHABET_I2P = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-~";
|
||||
|
||||
/** The 64 valid Base64 values for I2P. */
|
||||
private final static byte[] ALPHABET_ALT = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F',
|
||||
(byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L',
|
||||
(byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R',
|
||||
(byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X',
|
||||
(byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd',
|
||||
(byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j',
|
||||
(byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p',
|
||||
(byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v',
|
||||
(byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1',
|
||||
(byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7',
|
||||
(byte) '8', (byte) '9', (byte) '-', (byte) '~'};
|
||||
private final static byte[] ALPHABET_ALT = DataHelper.getASCII(ALPHABET_I2P);
|
||||
|
||||
/**
|
||||
* Translates a Base64 value to either its 6-bit reconstruction value
|
||||
|
Reference in New Issue
Block a user