# php-secp256k1 [![Build Status](https://travis-ci.org/kornrunner/php-secp256k1.svg?branch=master)](https://travis-ci.org/kornrunner/php-secp256k1) [![Coverage Status](https://coveralls.io/repos/github/kornrunner/php-secp256k1/badge.svg?branch=master)](https://coveralls.io/github/kornrunner/php-secp256k1?branch=master) ```lang=bash $ composer require kornrunner/secp256k1 ``` ## Usage Sign a message: ```php 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: ```php verify($hash, $signature, $publicKey); ``` ## License MIT ## Crypto ETH 0x9c7b7a00972121fb843af7af74526d7eb585b171