elliptic-php
elliptic-php copied to clipboard
PHP Fatal error: Uncaught Error: Class 'Elliptic\EC' not found
It shows me this error when i run this code:
<?php
require 'vendor/autoload.php';
use Elliptic\EC;
// Create and initialize EC context
// (better do it once and reuse it)
$ec = new EC('secp256k1');
// Generate keys
$key = $ec->genKeyPair();
$publicKey = $key->getPublic('hex');
$privateKey = $key->getPrivate('hex');
// Print the keys to the console
echo "The address1 is {$publicKey}. \r\n";
echo "The address1 is {$privateKey}. \r\n";
error:
PHP Fatal error: Uncaught Error: Class 'Elliptic\EC' not found in /home/istabraq/bctest/test2/test2.php:6 Stack trace: #0 {main} thrown in /home/istabraq/bctest/test2/test2.php on line 6
any help please?