FOF30\Encrypt\Totp::hashToInt PHP Méthode

hashToInt() protected méthode

Extracts a part of a hash as an integer
protected hashToInt ( string $bytes, string $start ) : string
$bytes string The hash
$start string The char to start from (0 = first char)
Résultat string
    protected function hashToInt($bytes, $start)
    {
        $input = substr($bytes, $start, strlen($bytes) - $start);
        $val2 = unpack("N", substr($input, 0, 4));
        return $val2[1];
    }