class Base64 (View source)

Class for base64 encoding and docoding

Methods

string
encode(string $data)

Encodes string $data to base64 encoding

string
decode(string $data)

Decodes base64 string $data to raw encoding

__construct()

Base64 constructor

encodeUpdate(string $data)

Encodes block of characters from $data and saves the reminder of the last block to the encoding context

encodeFinish()

Encodes characters that left in the encoding context

decodeUpdate(string $data)

Decodes block of characters from $data and saves the reminder of the last block to the encoding context

decodeFinish()

Decodes characters that left in the encoding context

Details

string encode(string $data)

Encodes string $data to base64 encoding

Parameters

string $data

Return Value

string

string decode(string $data)

Decodes base64 string $data to raw encoding

Parameters

string $data

Return Value

string

__construct()

Base64 constructor

encodeUpdate(string $data)

Encodes block of characters from $data and saves the reminder of the last block to the encoding context

Parameters

string $data

encodeFinish()

Encodes characters that left in the encoding context

decodeUpdate(string $data)

Decodes block of characters from $data and saves the reminder of the last block to the encoding context

Parameters

string $data

decodeFinish()

Decodes characters that left in the encoding context