public class Base32 extends Object
| Constructor and Description |
|---|
Base32() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
ascii2binary(String cs,
int lengthInBits)
Decode a Base32 string into binary data.
|
static String |
binary2ascii(byte[] os,
int lengthInBits)
Encode binary data into a Base32 string.
|
static int |
divceil(int a,
int b) |
public static int divceil(int a,
int b)
public static String binary2ascii(byte[] os, int lengthInBits)
os - The byte array containing the binary data. The length
must be at least (lengthInBits + 7) / 8 .lengthInBits - Defines how may bits of the binary data shall be
encoded into a base32 string.public static byte[] ascii2binary(String cs, int lengthInBits)
cs - The String containing the base32 data. The length
must be at least (lengthInBits + 5 - 1) / 5 characters .lengthInBits - Defines how may bits shall be decoded from the
String.Copyright © 2020. All rights reserved.