protected function _algoToDigest(SignatureAlgorithmIdentifier $algo): string
    {
        $oid = $algo->oid();
        if (!array_key_exists($oid, self::MAP_DIGEST_OID_TO_NAME)) {
            throw new \UnexpectedValueException(
                sprintf('Digest method %s not supported.', $algo->name()));
        }
        return self::MAP_DIGEST_OID_TO_NAME[$oid];
    }
protected function _algoToDigest(SignatureAlgorithmIdentifier $algo): string
    {
        $oid = $algo->oid();
        if (!array_key_exists($oid, self::MAP_DIGEST_OID_TO_NAME)) {
            throw new \UnexpectedValueException(
                sprintf('Digest method %s not supported.', $algo->name()));
        }
        return self::MAP_DIGEST_OID_TO_NAME[$oid];
    }
protected function _algoToDigest ( SignatureAlgorithmIdentifier $ algo ) : string { $ oid = $ algo -> oid ( ) ; if ( ! array_key_exists ( $ oid , self :: MAP_DIGEST_OID_TO_NAME ) ) { throw new \ UnexpectedValueException ( sprintf ( 'Digest method %s not supported.' , $ algo -> name ( ) ) ) ; } return self :: MAP_DIGEST_OID_TO_NAME [ $ oid ] ; }
Get OpenSSL digest method for given signature algorithm identifier.

@param SignatureAlgorithmIdentifier $algo
@throws \UnexpectedValueException
@return string
Get OpenSSL digest method for given signature algorithm identifier .