This commit is contained in:
2025-10-09 17:41:57 +00:00
commit 7a3b2960f8
146 changed files with 34948 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Elliptic\Curve;
class PresetCurve
{
public $curve;
public $g;
public $n;
public $hash;
function __construct($options)
{
if ( $options["type"] === "short" )
$this->curve = new ShortCurve($options);
elseif ( $options["type"] === "edwards" )
$this->curve = new EdwardsCurve($options);
else
$this->curve = new MontCurve($options);
$this->g = $this->curve->g;
$this->n = $this->curve->n;
$this->hash = isset($options["hash"]) ? $options["hash"] : null;
}
}
?>