CoreFiles by mySites.guru
ED512.php40 lines, 816 bytes, from Joomla_4.2.3-Stable-Full_Package.zip
Raw History Compare with 4.2.2
md5
a0e1a860a1356622e80d6faa32f51a25
sha1
02c05efb64734ad1df1c128160a3aa51a96e236e
sha256
5aa882dda2fd262f29c51bd2d5fa061b0a88ed66b9447adc7689dd49050188f2
<?php

declare(strict_types=1);

/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2019 Spomky-Labs
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

namespace Cose\Algorithm\Signature\EdDSA;

use Cose\Key\Key;

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

    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 131 releases, Joomla 4.0.0-beta to 4.4.14. See them all, or every version of this file.