1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<?php
declare(strict_types=1);
namespace Lcobucci\JWT\Tests\Signer\Rsa;
use Lcobucci\JWT\Signer\InvalidKeyProvided;
use Lcobucci\JWT\Signer\Key\InMemory;
use Lcobucci\JWT\Signer\OpenSSL;
use Lcobucci\JWT\Signer\Rsa;
use Lcobucci\JWT\Signer\Rsa\Sha512;
use PHPUnit\Framework\Attributes as PHPUnit;
use const OPENSSL_ALGO_SHA512;
#[PHPUnit\CoversClass(Rsa::class)]
#[PHPUnit\CoversClass(Sha512::class)]
#[PHPUnit\CoversClass(OpenSSL::class)]
#[PHPUnit\CoversClass(InvalidKeyProvided::class)]
#[PHPUnit\UsesClass(InMemory::class)]
final class Sha512Test extends RsaTestCase
{
protected function algorithm(): Rsa
{
return new Sha512();
}
protected function algorithmId(): string
{
return 'RS512';
}
protected function signatureAlgorithm(): int
{
return OPENSSL_ALGO_SHA512;
}
}
|