baseW_ static method
Converts message to base w
Implementation
static List<int> baseW_(
Uint8List msg,
List<int> destination,
int offset,
int length,
) {
int inIdx = 0;
int outIdx = 0;
int total = 0;
int bits = 0;
for (int consumed = 0; consumed < length; consumed++) {
if (bits == 0) {
total = msg[inIdx++];
bits += 8;
}
bits -= WOTSLOGW;
destination[outIdx + offset] = (total >> bits) & (WOTSW - 1);
outIdx++;
}
return destination;
}