CoreFiles by mySites.guru
ES256.php38 lines, 624 bytes, from Joomla_6.1.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 6.1.0-alpha1
md5
0af12997bbbbacce6e55b9a527572935
sha1
81d777fdf46996f051ee7c8bfa3976b3b132faa3
sha256
9bbb7e4b5990d8987f7e35fe3a79d8e7b519b356d8c4d09b99aa3dd9399e7ec2
<?php

declare(strict_types=1);

namespace Cose\Algorithm\Signature\ECDSA;

use Cose\Key\Ec2Key;
use const OPENSSL_ALGO_SHA256;

final class ES256 extends ECDSA
{
    public const ID = -7;

    public static function create(): self
    {
        return new self();
    }

    public static function identifier(): int
    {
        return self::ID;
    }

    protected function getHashAlgorithm(): int
    {
        return OPENSSL_ALGO_SHA256;
    }

    protected function getCurve(): int
    {
        return Ec2Key::CURVE_P256;
    }

    protected function getSignaturePartLength(): int
    {
        return 64;
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.