bitsToBigIntWithLengthLimit static method
Converts a sequence of bits represented as a byte array to a BigInt integer.
Implementation
static BigInt bitsToBigIntWithLengthLimit(List<int> data, int qlen) {
final BigInt x = BigInt.parse(BytesUtils.toHexString(data), radix: 16);
final int l = data.length * 8;
if (l > qlen) {
return (x >> (l - qlen));
}
return x;
}