| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cose\Algorithm\Mac; |
| 6 | |
| 7 | final class HS256 extends Hmac |
| 8 | { |
| 9 | public const ID = 5; |
| 10 | |
| 11 | public static function create(): self |
| 12 | { |
| 13 | return new self(); |
| 14 | } |
| 15 | |
| 16 | public static function identifier(): int |
| 17 | { |
| 18 | return self::ID; |
| 19 | } |
| 20 | |
| 21 | protected function getHashAlgorithm(): string |
| 22 | { |
| 23 | return 'sha256'; |
| 24 | } |
| 25 | |
| 26 | protected function getSignatureLength(): int |
| 27 | { |
| 28 | return 256; |
| 29 | } |
| 30 | } |