To decode it with Python:
"""Convert a base64 encoded string to decimal b64str: the base64 encoded string Example: 'ATFvqA==' -> 20017064, 'JA==' -> 36 """ def b64_string_to_decimal(b64str): decoded_bytes = base64.b64decode(b64str) decimal_value = decimal.Decimal(int.from_bytes(decoded_bytes, byteorder='big')) return decimal_value
To decode it with Java:
/* * Convert a base64 encoded string to decimal * b64str: the base64 encoded string * Example: 'ATFvqA==' -> 20017064, 'JA==' -> 36 */ public BigDecimal base64StringToDecimal(String b64String) { BigDecimal bigDecimal = new BigDecimal(new BigInteger(Base64.getDecoder().decode(b64String))); return bigDecimal; }