src/fkooman/X509/CertParser.php
public function getFingerprint($alg = 'sha256')
    {
        if (!in_array($alg, hash_algos())) {
            throw new RuntimeException(
                sprintf(
                    'unsupported algorithm "%s"',
                    $alg
                )
            );
        }

        return hash($alg, $this->toDer(), true);
    }
public function getFingerprint($alg = 'sha256')
    {
        if (!in_array($alg, hash_algos())) {
            throw new RuntimeException(
                sprintf(
                    'unsupported algorithm "%s"',
                    $alg
                )
            );
        }

        return hash($alg, $this->toDer(), true);
    }
public function getFingerprint ( $ alg = 'sha256' ) { if ( ! in_array ( $ alg , hash_algos ( ) ) ) { throw new RuntimeException ( sprintf ( 'unsupported algorithm "%s"' , $ alg ) ) ; } return hash ( $ alg , $ this -> toDer ( ) , true ) ; }
Get the raw fingerprint of the certificate.

@param string $alg the algorithm to use

@return string the raw fingerprint of the certificate as binary string

@see http://php.net/manual/en/function.hash-algos.php
Get the raw fingerprint of the certificate .