private function hashPrint($input)
    {
        // Get the stronger hashing algorithm available to minimize collision risks
        $algorithms = hash_algos();
        $algorithm = $algorithms[0];
        $number = 0;
        foreach ($algorithms as $hashAlgorithm) {
            $lettersLength = substr($hashAlgorithm, 0, 2) === 'md'
                ? 2
                : (substr($hashAlgorithm, 0, 3) === 'sha'
                    ? 3
                    : 0
                );
            if ($lettersLength) {
                $hashNumber = substr($hashAlgorithm, $lettersLength);
                if ($hashNumber > $number) {
                    $number = $hashNumber;
                    $algorithm = $hashAlgorithm;
                }

                continue;
            }
        }

        return rtrim(strtr(base64_encode(hash($algorithm, $input, true)), '+/', '-_'), '=');
    }
private function hashPrint($input)
    {
        // Get the stronger hashing algorithm available to minimize collision risks
        $algorithms = hash_algos();
        $algorithm = $algorithms[0];
        $number = 0;
        foreach ($algorithms as $hashAlgorithm) {
            $lettersLength = substr($hashAlgorithm, 0, 2) === 'md'
                ? 2
                : (substr($hashAlgorithm, 0, 3) === 'sha'
                    ? 3
                    : 0
                );
            if ($lettersLength) {
                $hashNumber = substr($hashAlgorithm, $lettersLength);
                if ($hashNumber > $number) {
                    $number = $hashNumber;
                    $algorithm = $hashAlgorithm;
                }

                continue;
            }
        }

        return rtrim(strtr(base64_encode(hash($algorithm, $input, true)), '+/', '-_'), '=');
    }
private function hashPrint ( $ input ) { // Get the stronger hashing algorithm available to minimize collision risks $ algorithms = hash_algos ( ) ; $ algorithm = $ algorithms [ 0 ] ; $ number = 0 ; foreach ( $ algorithms as $ hashAlgorithm ) { $ lettersLength = substr ( $ hashAlgorithm , 0 , 2 ) === 'md' ? 2 : ( substr ( $ hashAlgorithm , 0 , 3 ) === 'sha' ? 3 : 0 ) ; if ( $ lettersLength ) { $ hashNumber = substr ( $ hashAlgorithm , $ lettersLength ) ; if ( $ hashNumber > $ number ) { $ number = $ hashNumber ; $ algorithm = $ hashAlgorithm ; } continue ; } } return rtrim ( strtr ( base64_encode ( hash ( $ algorithm , $ input , true ) ) , '+/' , '-_' ) , '=' ) ; }
Return a hashed print from input file or content.

@param string $input

@return string
Return a hashed print from input file or content .