<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier\Hash; use SpomkyLabs\Pki\ASN1\Element; use SpomkyLabs\Pki\ASN1\Type\Primitive\NullType; use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType; use SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier\Feature\HashAlgorithmIdentifier; use SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier\SpecificAlgorithmIdentifier; final class SHA1AlgorithmIdentifier extends SpecificAlgorithmIdentifier implements HashAlgorithmIdentifier { private ?NullType $params; private function __construct() { parent::__construct(self::OID_SHA1); $this->params = null; } public static function create(): self { return new self(); } public function name(): string { return 'sha1'; } public static function fromASN1Params(?UnspecifiedType $params = null): static { $obj = static::create(); if (isset($params)) { $obj->params = $params->asNull(); } return $obj; } protected function paramsASN1(): ?Element { return $this->params; } } 