kms.utils

Module Contents

Functions

decode(payload)

https://en.wikipedia.org/wiki/Base64#URL_applications modified Base64

encode(payload)

https://en.wikipedia.org/wiki/Base64#URL_applications modified Base64

kms.utils.decode(payload)

https://en.wikipedia.org/wiki/Base64#URL_applications modified Base64 for URL variants exist, where the + and / characters of standard Base64 are respectively replaced by - and _

Does not make any assumptions about encoding – if you’re encoding a bytes payload then foo == decode(encode(foo)), but if foo is a string you’ll need to .decode() manually according to your expected encoding scheme.

Parameters:

payload (str) –

Return type:

bytes

kms.utils.encode(payload)

https://en.wikipedia.org/wiki/Base64#URL_applications modified Base64 for URL variants exist, where the + and / characters of standard Base64 are respectively replaced by - and _

Parameters:

payload (Union[bytes, str]) –

Return type:

str