base32Encode static method
Implementation
static String base32Encode(List<int> bytes) {
final StringBuffer buffer = StringBuffer();
int value = 0;
int bits = 0;
for (final int b in bytes) {
value = (value << 8) | b;
bits += 8;
while (bits >= 5) {
bits -= 5;
buffer.write(_base32Alphabet[(value >> bits) & 31]);
}
}
if (bits > 0) buffer.write(_base32Alphabet[(value << (5 - bits)) & 31]);
while (buffer.length % 8 != 0) {
buffer.write("=");
}
return buffer.toString();
}