number_to_base64

gafaelfawr.util.number_to_base64(data)

Convert an integer to base64-encoded bytes in big endian order.

The base64 encoding used here is the Base64urlUInt encoding defined in RFC 7515 and 7518, which uses the URL-safe encoding characters and omits all padding.

Parameters:

data (int) – Arbitrarily large number

Returns:

The equivalent URL-safe base64-encoded string corresponding to the number in big endian order.

Return type:

bytes