\CodeFareith\CfGoogleAuthenticator\Application\EncoderBase32

Base32 encoder / decoder

Class for encoding / decoding in Base32. Provides four standard character sets:

Default pad string is '='.

However, you can define your own character set and pad string during instantiation. In this case, the desired character set's length must be exactly 32 characters and the desired pad string's length must be exactly one character.

Summary

Methods
Properties
Constants
__construct()
setCharset()
charset()
setPadString()
padString()
encode()
decode()
No public properties found
CHARSET_RFC4648
CHARSET_ZBASE32
CHARSET_CROCKFORD
CHARSET_BASE32HEX
LENGTH_CHARSET
LENGTH_PAD_STRING
PAD_STRING
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

CHARSET_RFC4648

CHARSET_RFC4648 = ABCDEFGHIJKLMNOPQRSTUVWXYZ234567

CHARSET_ZBASE32

CHARSET_ZBASE32 = ybndrfg8ejkmcpqxot1uwisza345h769

CHARSET_CROCKFORD

CHARSET_CROCKFORD = 0123456789ABCDEFGHJKMNPQRSTVWXYZ

CHARSET_BASE32HEX

CHARSET_BASE32HEX = 0123456789ABCDEFGHIJKLMNOPQRSTUV

LENGTH_CHARSET

LENGTH_CHARSET = 32

LENGTH_PAD_STRING

LENGTH_PAD_STRING = 1

PAD_STRING

PAD_STRING = =

Methods

__construct()

__construct(string  charset = null, string  padString = null) : 

Parameters

string charset
string padString

Returns

setCharset()

setCharset(string  charset) : 

Parameters

string charset

Returns

charset()

charset() : 

Returns

setPadString()

setPadString(string  padString) : 

Parameters

string padString

Returns

padString()

padString() : 

Returns

encode()

encode(string  data) : 

Parameters

string data

Returns

decode()

decode(string  data) : 

Parameters

string data

Returns