\CodeFareith\CfGoogleAuthenticator\UtilityBase32Utility

Base32 encoder / decoder

This utility class helps to encode and decode values with Base32. It provides three different standard charsets: RFC4648, CROCKFORD and MIME_09AV.

Summary

Methods
Properties
Constants
generateRandomString()
encode()
decode()
No public properties found
RFC4648
CROCKFORD
MIME_09AV
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

RFC4648

RFC4648 = ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=

CROCKFORD

CROCKFORD = 0123456789ABCDEFGHJKMNPQRSTVWXYZ

MIME_09AV

MIME_09AV = 0123456789ABCDEFGHIJKLMNOPQRSTUV

Methods

generateRandomString()

generateRandomString(int  stringLength, string  charset = null) : 

Parameters

int stringLength
string charset

Throws

\Exception

Returns

encode()

encode(string  string, string  charset = null) : 

Parameters

string string
string charset

Returns

decode()

decode(string  base32, string  charset = null) : 

Parameters

string base32
string charset

Returns