<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier; use SpomkyLabs\Pki\ASN1\Element; use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType; final class GenericAlgorithmIdentifier extends AlgorithmIdentifier { private function __construct( string $oid, private readonly ?UnspecifiedType $params ) { parent::__construct($oid); } public static function create(string $oid, ?UnspecifiedType $params = null): self { return new self($oid, $params); } public function name(): string { return $this->oid; } public function parameters(): ?UnspecifiedType { return $this->params; } protected function paramsASN1(): ?Element { return $this->params?->asElement(); } } 