CoreFiles by mySites.guru
HS256_64.php28 lines, 521 bytes, from Joomla_5.1.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.0.0-beta3
md5
a126001ed50ada8fe8266d1abf5f3b5b
sha1
caee1206b854d2e15a8843f83694187ad60a3189
sha256
888df4c7ae2dc7f775a97e695f4f952cddbf5294f72c41663c1dec648edb870c
<?php

declare(strict_types=1);

namespace Jose\Experimental\Signature;

use Jose\Component\Core\JWK;
use Jose\Component\Signature\Algorithm\HMAC;

final class HS256_64 extends HMAC
{
    public function hash(JWK $key, string $input): string
    {
        $signature = parent::hash($key, $input);

        return mb_substr($signature, 0, 8, '8bit');
    }

    public function name(): string
    {
        return 'HS256/64';
    }

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

No other release has this exact content. See every version of this file.