sha256 - Generate HMAC Signature on PHP
766
how do you apply the system below to php?
StringToSign = HTTPMethod+":"+RelativeUrl+":"+AccessToken+":"+
Lowercase(HexEncode(SHA-256(RequestBody)))+":"+Timestamp
Signature = HMAC-SHA256(apiSecret, StringToSign)
my script :
$encoderData = json_encode($bodyToHash, JSON_UNESCAPED_SLASHES);
$hash = hash("sha256", $encoderData);
$stringToSign = $Method. ":" .$url . ":" . $auth_token . ":" . $hash . ":" . $Timestamp;
$auth_signature = hash_hmac('sha256', $secret_key, $stringToSign,false);
Thank you,
Answer
Solution:
I don't know what you mean but You can try this;
Answer
Solution:
doing some BCA stuff? :p
you can use this function if you wan to use
GET
: