alternativeToCborTag static method

int? alternativeToCborTag(
  1. BigInt alternative
)

Implementation

static int? alternativeToCborTag(BigInt alternative) {
  if (alternative <= BigInt.from(6)) {
    return (alternative + BigInt.from(121)).toInt();
  } else if (alternative > BigInt.from(6) &&
      alternative <= BigInt.from(127)) {
    return (alternative + BigInt.from(1273)).toInt();
  }
  return null;
}