encodeBigInt function
Implementation
String encodeBigInt(BigInt? v) {
final b256 = BigInt.from(256);
var bytes = <int>[];
while (v != BigInt.zero) {
bytes.add((v! % b256).toInt());
v = v ~/ b256;
}
return convert.base64Url.encode(bytes.reversed.toList());
}