I hereby claim:
- I am alangrainger on github.
- I am alan_ (https://keybase.io/alan_) on keybase.
- I have a public key ASCAG1R7ChZGELoMqd3l_rSOtAosrnIYgvSnFh2xbMC4awo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$time = round(microtime(true), 3); | |
$method = strtoupper($method); | |
$string = $time . $method . $endpoint; | |
$hash = hash_hmac('sha256', $string, $secret); | |
$hash = base64_encode(hex2bin($hash)); | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => 'https://www.okex.com' . $endpoint, |
<?php | |
/* | |
Command lines to generate the keys: | |
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048 | |
openssl rsa -pubout -in private_key.pem -out public_key.pem | |
*/ | |
if (isset($_POST['data'])) { |