PHP Класс FOF30\Encrypt\Base32

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
decode ( string $str ) : string Convert any base32 string to a normal sctring This should be binary safe.
encode ( string $str ) : string Convert any string to a base32 string This should be binary safe.

Приватные методы

Метод Описание
bin2str ( string $str ) : string Converts a binary string to an ascii string
fromBin ( string $str ) : string Converts a correct binary string to base32
mapBin ( string $chr ) : string Used with array_map to map the characters from a base32 character set directly into a binary string
mapCharset ( string $str ) : string Used with array_map to map the bits from a binary string directly into a base32 character set
str2bin ( string $str ) : string Converts any ascii string to a binary string
toBin ( string $str ) : string Accepts a base32 string and returns an ascii binary string

Описание методов

decode() публичный метод

..
public decode ( string $str ) : string
$str string The base32 string to convert
Результат string The normal string

encode() публичный метод

..
public encode ( string $str ) : string
$str string The string to convert
Результат string The converted base32 string