Skip to main content

b64encode

Encodes a string into a Base64-encoded string by converting the input to bytes, performing the encoding, and converting the result back to a string.

def b64encode(
s: string
) - > string

Encodes a string into a Base64-encoded string by converting the input to bytes and the resulting encoded bytes back to a string.

Parameters

NameTypeDescription
sstringThe input string to be encoded into Base64 format.

Returns

TypeDescription
stringThe Base64-encoded representation of the input string.