i need to send signature when hitting API, the description value is:
within asymmetric algorithm signature SHA256withRSA
(Private_Key, stringToSign). stringToSign = client_ID + “|” + X-TIMESTAMP
my code:
$timestamp = $this->x_timestamp;
$stringToSign = $this->client_id . '|' . $timestamp;
$privateKey = file_get_contents($this->private_key_path);
$privateKey = openssl_get_privatekey($privateKey);
openssl_sign($stringToSign, $signature, $privateKey, OPENSSL_ALGO_SHA256);
$signature = base64_encode($signature);
the response are "Unauthorized. stringToSign"
am i correct to generate signature?