PHP code example of paragonie / ecc
1. Go to this page and download the library: Download paragonie/ecc library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paragonie / ecc example snippets
use Mdanter\Ecc\EccFactory;
use Mdanter\Ecc\Math\GmpMath;
$adapter = new GmpMath();
// This will throw an InsecureCurveException:
// $p192 = EccFactory::getNistCurves($adapter)->generator192();
// This will succeed:
$p192 = EccFactory::getNistCurves($adapter, true)->generator192();
// This will also succeed, without any special considerations:
$p256 = EccFactory::getNistCurves()->generator256();