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.