Back to Base32 class

Method _mapbin

private string
_mapbin
(mixed $chr)
_mapbin
Parameters
  • string $chr The character to map
Returns
  • string String of 0's and 1's
-
  • private
Class: Base32
Project: Joomla

Method _mapbin - Source code

/**
 * _mapbin
 *
 * Used with array_map to map the characters from a base32
 * character set directly into a binary string
 *
 * @param   string  $chr  The character to map
 *
 * @return  string  String of 0's and 1's
 *
 * @access private
 */
private function _mapbin($chr)
{
    return sprintf('%08b', strpos(self::CSRFC3548, $chr));
}