base64_to_number

gafaelfawr.util.base64_to_number(data)

Convert base64-encoded bytes to an integer.

Parameters:

data (str) – Base64-encoded number, possibly without padding.

Returns:

The result converted to a number. Note that Python ints can be arbitrarily large.

Return type:

int

Notes

Used for converting the modulus and exponent in a JWKS to integers in preparation for turning them into a public key.