2017 © Pedro PelĆ”ez
 

library secp256k1

Pure PHP secp256k1

image

kornrunner/secp256k1

Pure PHP secp256k1

  • Thursday, July 26, 2018
  • by kornrunner
  • Repository
  • 1 Watchers
  • 1 Stars
  • 237 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

php-secp256k1 Tests Coverage Status Latest Stable Version

```lang=bash $ composer require kornrunner/secp256k1, (*1)


## Usage Sign a message: ```php <?php require_once 'vendor/autoload.php'; use kornrunner\Secp256k1; use kornrunner\Serializer\HexSignatureSerializer; $secp256k1 = new Secp256k1(); // return signature contains r, s and recovery param (v). // message and privateKey are hex strings $signature = $secp256k1->sign($message, $privateKey); // get r $r = $signature->getR(); // get s $s = $signature->getS(); // get recovery param $v = $signature->getRecoveryParam(); // encode to hex $serializer = new HexSignatureSerializer(); $signatureString = $serializer->serialize($signature); // or you can call toHex $signatureString = $signature->toHex();

Verify a message:, (*2)

<?php

require_once 'vendor/autoload.php';

use kornrunner\Secp256k1;

$secp256k1 = new Secp256k1();

// signature was created by sign method
// hash and publicKey are hex strings
$isVerified = $secp256k1->verify($hash, $signature, $publicKey);

License

MIT, (*3)

Crypto

Ethereum 0x9c7b7a00972121fb843af7af74526d7eb585b171, (*4)

The Versions

26/07 2018

dev-master

9999999-dev

Pure PHP secp256k1

  Sources   Download

MIT

The Requires

 

The Development Requires

elliptic curve secp256k1 ecc

25/07 2018

0.1.1

0.1.1.0

Pure PHP secp256k1

  Sources   Download

MIT

The Requires

 

The Development Requires

11/06 2018

0.1.0

0.1.0.0

Puse PHP secp256k1

  Sources   Download

MIT

The Requires

 

The Development Requires

11/06 2018

0.0.1

0.0.1.0

Puse PHP secp256k1

  Sources   Download

MIT

The Requires

 

The Development Requires