Skip to main content

b64_encode

Encodes a byte string into a URL-safe Base64 format and removes any trailing padding characters.

def b64_encode(
s: bytes
) - > bytes

Encodes a byte string into a URL-safe Base64 format with all trailing padding characters removed.

Parameters

NameTypeDescription
sbytesThe raw byte string to be encoded into Base64 format.

Returns

TypeDescription
bytesThe URL-safe Base64 encoded byte string without the '=' padding characters.