Back to Base32 class

Method encode

public string
encode
(mixed $str)
fromString
Parameters
  • string $str The string to convert
Returns
  • string The converted base32 string
Class: Base32
Project: Joomla

Method encode - Source code

/**
 * fromString
 *
 * Convert any string to a base32 string
 * This should be binary safe...
 *
 * @param   string  $str  The string to convert
 *
 * @return  string  The converted base32 string
 */
public function encode($str)
{
    return $this->fromBin($this->str2bin($str));
}