Prado\Web\UI\WebControls\TCaptcha::hash2string PHP Метод

hash2string() защищенный Метод

Converts a hash string into a string with characters consisting of alphanumeric characters.
protected hash2string ( $hex, $alphabet = '' ) : string
Результат string the converted string
    protected function hash2string($hex, $alphabet = '')
    {
        if (strlen($alphabet) < 2) {
            $alphabet = '234578adefhijmnrtABDEFGHJLMNQRT';
        }
        $hexLength = strlen($hex);
        $base = strlen($alphabet);
        $result = '';
        for ($i = 0; $i < $hexLength; $i += 6) {
            $number = hexdec(substr($hex, $i, 6));
            while ($number) {
                $result .= $alphabet[$number % $base];
                $number = floor($number / $base);
            }
        }
        return $result;
    }