<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\CryptoTypes\Asymmetric\RFC8410; use LogicException; use SpomkyLabs\Pki\ASN1\Type\Primitive\BitString; use SpomkyLabs\Pki\CryptoTypes\Asymmetric\PublicKey; abstract class RFC8410PublicKey extends PublicKey { protected function __construct( private readonly string $publicKey ) { } public function toDER(): string { throw new LogicException("RFC 8410 public key doesn't have a DER encoding."); } public function subjectPublicKey(): BitString { return BitString::create($this->publicKey); } } 