-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hello, i can't get a way to get the same hash as you.
What is the "YOUR_APPLICATION_SECRET" ? I tryied with Client ID, Client Secret, Private App Access Code.
Your documentation specifies code in Ruby:
encoded_body = Base64.encode64(json_body) # assuming json_body comes from the request
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha1"), YOUR_APPLICATION_SECRET, encoded_body)
Here is my code with php:
$signature = $request->headers->get('X-Content-Signature');
$data = chunk_split(base64_encode($request->getContent()), 60, "\n");
$secret = 'YOUR_APPLICATION_SECRET';
$hash = hash_hmac('sha1', $data, $secret);
hash_equals($hash, $signature); // false
And still when i compare the hash and your signature, it's never equal.
Metadata
Metadata
Assignees
Labels
No labels