public class Radix64Codec extends Object
This codec implements Radix-64 as defined by the PGP software.
Radix64InputStream
,
Radix64OutputStream
Modifier and Type | Field and Description |
---|---|
private static byte |
pad |
private static String |
radix64 |
Modifier | Constructor and Description |
---|---|
private |
Radix64Codec() |
Modifier and Type | Method and Description |
---|---|
static int |
decode(byte[] input,
byte[] output)
Decode 4 bytes of printable ASCII text into up to 3 bytes of binary data.
|
static byte[] |
encode(byte[] input,
int len)
Encode up to 3 bytes of binary data as 4 bytes of printable ASCII text.
|
static boolean |
isRadix64Character(byte c)
Determine if a byte is a valid Radix-64 encoding character; one of the
characters: '+', '/', '=', '0' - '9', 'A' - 'Z', 'a' - 'z'.
|
private static final String radix64
private static final byte pad
private Radix64Codec()
public static final boolean isRadix64Character(byte c)
c
- The byte to test.true
if c
is a Radix-64 character,
false
otherwise.public static final byte[] encode(byte[] input, int len)
input
- A 3-byte long array of input.len
- The number of bytes (1, 2, or 3) that are significant in the
input.public static final int decode(byte[] input, byte[] output)
input
- A 4-byte long array of input bytes.output
- A 3-byte long array in which up to 3 bytes of decoded
output will be stored.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses