2017 © Pedro Peláez
 

library secp256k1

Ethereum secp256k1 library in PHP

image

xiongchao/secp256k1

Ethereum secp256k1 library in PHP

  • Friday, June 15, 2018
  • by xiongchao
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Secp256k1-PHP

Secp256k1-PHP

功能

  • PHP实现secp256k1算法

安装

本包依赖于secp256k1库,安装secp256k1库请参考secp256k1-php进行安装, (*1)

  • git 安装, (*2)

    git clone https://github.com/xiongchao123/secp256k1-php.git & composer install, (*3)

  • composer 安装, (*4)

    composer require xiongchao/secp256k1-php, (*5)

如何使用


require_once __DIR__."/vendor/autoload.php"; use Xiongchao\Secp256k1\Secp256k1; $secp256k=app(Secp256k1::class); $priKey=$secp256k->generatePrivateKey(); $pubKey=$secp256k->generatePublicKey($priKey); $content="This is a message!"; $contentHash=$secp256k->getContentHash($content); $msg32 = $secp256k->_toBinary32($contentHash); $rSign=$secp256k->getRecoverableSign($priKey,$msg32); $sign=$secp256k->getSign($priKey,$secp256k->_toBinary32($contentHash)); var_dump($secp256k->verifyRecoverableSign($pubKey,$rSign,$msg32)); var_dump($secp256k->verifySign($pubKey,$sign,$secp256k->_toBinary32($contentHash)));

The Versions

15/06 2018

dev-master

9999999-dev

Ethereum secp256k1 library in PHP

  Sources   Download

MIT

The Requires

 

by Avatar xiongchao

extension php bitcoin ecdsa secp256k1 cryptocurrency ecc bitwasp

15/06 2018

v0.1.0

0.1.0.0

Ethereum secp256k1 library in PHP

  Sources   Download

MIT

The Requires

 

by Avatar xiongchao

extension php bitcoin ecdsa secp256k1 cryptocurrency ecc bitwasp