| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cose\Algorithm\Signature\ECDSA; |
| 6 | |
| 7 | use Cose\Key\Ec2Key; |
| 8 | use const OPENSSL_ALGO_SHA384; |
| 9 | |
| 10 | final class ES384 extends ECDSA |
| 11 | { |
| 12 | public const ID = -35; |
| 13 | |
| 14 | public static function create(): self |
| 15 | { |
| 16 | return new self(); |
| 17 | } |
| 18 | |
| 19 | public static function identifier(): int |
| 20 | { |
| 21 | return self::ID; |
| 22 | } |
| 23 | |
| 24 | protected function getHashAlgorithm(): int |
| 25 | { |
| 26 | return OPENSSL_ALGO_SHA384; |
| 27 | } |
| 28 | |
| 29 | protected function getCurve(): int |
| 30 | { |
| 31 | return Ec2Key::CURVE_P384; |
| 32 | } |
| 33 | |
| 34 | protected function getSignaturePartLength(): int |
| 35 | { |
| 36 | return 96; |
| 37 | } |
| 38 | } |