public static function algoForAsymmetricCrypto(
        AsymmetricCryptoAlgorithmIdentifier $crypto_algo,
        HashAlgorithmIdentifier $hash_algo): SignatureAlgorithmIdentifier
    {
        switch ($crypto_algo->oid()) {
            case AlgorithmIdentifier::OID_RSA_ENCRYPTION:
                $oid = self::_oidForRSA($hash_algo);
                break;
            case AlgorithmIdentifier::OID_EC_PUBLIC_KEY:
                $oid = self::_oidForEC($hash_algo);
                break;
            default:
                throw new \UnexpectedValueException(
                    sprintf("Crypto algorithm %s not supported.",
                        $crypto_algo->name()));
        }
        $cls = (new AlgorithmIdentifierFactory())->getClass($oid);
        return new $cls();
    }