<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier\Cipher; use LogicException; use SpomkyLabs\Pki\ASN1\Type\Primitive\OctetString; abstract class AESCBCAlgorithmIdentifier extends BlockCipherAlgorithmIdentifier { public function blockSize(): int { return 16; } public function ivSize(): int { return 16; } protected function paramsASN1(): OctetString { if (! isset($this->initializationVector)) { throw new LogicException('IV not set.'); } return OctetString::create($this->initializationVector); } } 