CoreFiles by mySites.guru
HS256_64.php27 lines, 483 bytes, from Joomla_5.0.1-Stable-Full_Package.zip
Raw History Compare with 5.0.0
md5
b32697018779aa5372981cea7084458d
sha1
ec40d540641f51fe78a17c910e4a397f26ee6697
sha256
8cc987e85b722da7a92a5e80baf0cdb663130be9f1e59b9a5992244aa9907d0d
<?php

declare(strict_types=1);

namespace Jose\Component\Signature\Algorithm;

use Jose\Component\Core\JWK;

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';
    }
}

The same content is in 22 releases, Joomla 5.0.0-alpha1 to 5.1.0-alpha4. See them all, or every version of this file.