class Base64Encoder implementsEncoderInterface

Methods

string
encodeString(string$string,string|null$charset ='utf-8',int$firstLineOffset =0,int$maxLineLength =0)

Takes an unencoded string and produces a Base64 encoded string from it.

Details

string encodeString(string$string,string|null$charset ='utf-8',int$firstLineOffset =0,int$maxLineLength =0)

Takes an unencoded string and produces a Base64 encoded string from it.

Base64 encoded strings have a maximum line length of 76 characters. If the first line needs to be shorter, indicate the difference with $firstLineOffset.

Parameters

string $string
string|null $charset
int $firstLineOffset
int $maxLineLength

Return Value

string