mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-18 03:05:11 +00:00
28 lines
685 B
PHP
28 lines
685 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace phpseclib3\Tests\Unit\Crypt\EC;
|
|
|
|
use phpseclib3\Common\Functions\Strings;
|
|
use phpseclib3\Crypt\EC\Curves\Ed448;
|
|
use phpseclib3\Crypt\EC\Formats\Keys\Common;
|
|
use phpseclib3\Exception\UnexpectedValueException;
|
|
|
|
class Ed448PublicKey
|
|
{
|
|
use Common;
|
|
|
|
public static function load($key, ?string $password = null): array
|
|
{
|
|
if (!Strings::is_stringable($key)) {
|
|
throw new UnexpectedValueException('Key should be a string - not a ' . gettype($key));
|
|
}
|
|
|
|
$components = ['curve' => new Ed448()];
|
|
$components['QA'] = self::extractPoint($key, $components['curve']);
|
|
|
|
return $components;
|
|
}
|
|
}
|