Back to Base32 class

Method _mapcharset

private string
_mapcharset
(mixed $str)
_mapcharset
Parameters
  • string $str The string of 0's and 1's you want to convert
Returns
  • string Resulting base32 character
-
  • private
Class: Base32
Project: Joomla

Method _mapcharset - Source code

/**
 * _mapcharset
 *
 * Used with array_map to map the bits from a binary string
 * directly into a base32 character set
 *
 * @param   string  $str  The string of 0's and 1's you want to convert
 *
 * @return  string  Resulting base32 character
 *
 * @access private
 */
private function _mapcharset($str)
{
    // Huh!
    $x = self::CSRFC3548;
    return $x[bindec($str)];
}