CoreFiles by mySites.guru
HS384.php31 lines, 573 bytes, from Joomla_5.2.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.1.0-beta2
md5
c05d310a082c4bdf2928b526e4669b5b
sha1
5051bd4146448be8cedc97ef48d81cb31aa41ac0
sha256
6b8e36f6f734448aeb32eee4d206ab25de895df16e8f82fa248a471ad65e5d2e
<?php

declare(strict_types=1);

namespace Jose\Component\Signature\Algorithm;

use InvalidArgumentException;
use Jose\Component\Core\JWK;

final class HS384 extends HMAC
{
    public function name(): string
    {
        return 'HS384';
    }

    protected function getHashAlgorithm(): string
    {
        return 'sha384';
    }

    protected function getKey(JWK $key): string
    {
        $k = parent::getKey($key);
        if (mb_strlen($k, '8bit') < 48) {
            throw new InvalidArgumentException('Invalid key length.');
        }

        return $k;
    }
}

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.