Base32

Base32 encryption class

since

1.0

package

Joomla CMS

Methods

_mapbin

_mapbin

_mapbin( chr) : 

Used with array_map to map the characters from a base32 character set directly into a binary string

access

private

Arguments

chr

stringThe character to map

Response

stringString of 0's and 1's

_mapcharset

_mapcharset

_mapcharset( str) : 

Used with array_map to map the bits from a binary string directly into a base32 character set

access

private

Arguments

str

stringThe string of 0's and 1's you want to convert

Response

stringResulting base32 character

bin2str

bin2str

bin2str( str) : 

Converts a binary string to an ascii string

throws

Exception

Arguments

str

stringThe string of 0's and 1's you want to convert

Response

stringThe ascii output

decode

toString

decode( str) : 

Convert any base32 string to a normal sctring This should be binary safe...

Arguments

str

stringThe base32 string to convert

Response

stringThe normal string

encode

fromString

encode( str) : 

Convert any string to a base32 string This should be binary safe...

Arguments

str

stringThe string to convert

Response

stringThe converted base32 string

fromBin

fromBin

fromBin( str) : 

Converts a correct binary string to base32

throws

Exception

Arguments

str

stringThe string of 0's and 1's you want to convert

Response

stringString encoded as base32

str2bin

str2bin

str2bin( str) : 

Converts any ascii string to a binary string

Arguments

str

stringThe string you want to convert

Response

stringString of 0's and 1's

toBin

toBin

toBin( str) : 

Accepts a base32 string and returns an ascii binary string

throws

Exception

Arguments

str

stringThe base32 string to convert

Response

stringAscii binary string

Constants

CSRFC3548

CSRFC3548

The character set as defined by RFC3548

Value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'
link