CoreFiles by mySites.guru
Ed512.php36 lines, 697 bytes, from Joomla_6.2.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 6.2.0-alpha1
md5
8262de5e41dc8b4d1d50c372fa7336fe
sha1
4d41617c5615a9a0a7aa2009151183ed5cd78f7c
sha256
f57d7fe7744ac10c95d25b59c77c67ed28765066eecd759067be99e855d65693
<?php

declare(strict_types=1);

namespace Cose\Algorithm\Signature\EdDSA;

use Cose\Key\Key;

final class Ed512 extends EdDSA
{
    public const ID = -261;

    public static function create(): self
    {
        return new self();
    }

    public static function identifier(): int
    {
        return self::ID;
    }

    public function sign(string $data, Key $key): string
    {
        $hashedData = hash('sha512', $data, true);

        return parent::sign($hashedData, $key);
    }

    public function verify(string $data, Key $key, string $signature): bool
    {
        $hashedData = hash('sha512', $data, true);

        return parent::verify($hashedData, $key, $signature);
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.