shopex / phpbitcrypt
bitcrypt sdk
v1.0.0
2019-11-26 11:17 UTC
Requires
- php: >=7.2
- guzzlehttp/guzzle: ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.3
- monolog/monolog: ^2.0
- phpunit/phpunit: ^8.4
This package is auto-updated.
Last update: 2024-10-27 05:57:25 UTC
README
1. Require with Composer
composer require shopex/phpbitcrypt
2. Example
use GuzzleHttp\Client;
use Edwinlll\PhpBitcrypt\Rsa;
use Monolog\Logger;
$rsa = new Rsa(function() {
return new Client([
"base_uri" => "http://127.0.0.1:9989"
]);
}, $logger);
$response = $rsa->encrypt("token", "data");
if($response->getStatusCode() == 200) {
$rst = $response->json();
$data = $response->json("data", "default data");
}