Page MenuHomePhabricator

D19508.diff
No OneTemporary

D19508.diff

diff --git a/src/docs/user/userguide/webhooks.diviner b/src/docs/user/userguide/webhooks.diviner
--- a/src/docs/user/userguide/webhooks.diviner
+++ b/src/docs/user/userguide/webhooks.diviner
@@ -66,17 +66,9 @@
To compute the SHA256 HMAC of a string in Python, do this:
```lang=python
-from subprocess import check_output
-
-signature = check_output(
- [
- "php",
- "-r",
- "echo hash_hmac('sha256', $argv[1], $argv[2]);",
- "--",
- request_body,
- hmac_key
- ])
+import hashlib
+import hmac
+signature = hmac.new(hmac_key, request_body, hashlib.sha256).hexdigest()
```
Other languages often provide similar support.

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 9:29 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728816
Default Alt Text
D19508.diff (645 B)

Event Timeline