scripts-dev/federation_client.py
def encode_base64(input_bytes):
    """Encode bytes as a base64 string without any padding."""

    input_len = len(input_bytes)
    output_len = 4 * ((input_len + 2) // 3) + (input_len + 2) % 3 - 2
    output_bytes = base64.b64encode(input_bytes)
    output_string = output_bytes[:output_len].decode("ascii")
    return output_string
Encode bytes as a base64 string without any padding.
Encode bytes as a base64 string without any padding.
Encode bytes as a base64 string without any padding .
def encode_base64(input_bytes):
    input_len = len(input_bytes)
    output_len = 4 * ((input_len + 2) // 3) + (input_len + 2) % 3 - 2
    output_bytes = base64.b64encode(input_bytes)
    output_string = output_bytes[:output_len].decode("ascii")
    return output_string
def encode_base64 ( input_bytes ) : input_len = len ( input_bytes ) output_len = 4 * ( ( input_len + 2 ) // 3 ) + ( input_len + 2 ) % 3 - 2 output_bytes = base64 . b64encode ( input_bytes ) output_string = output_bytes [ : output_len ] . decode ( "ascii" ) return output_string
Encode bytes as a base64 string without any padding.
Encode bytes as a base64 string without any padding .
"""Encode bytes as a base64 string without any padding."""
input_bytes