Skip to content

Commit

Permalink
Update testing.moon
Browse files Browse the repository at this point in the history
  • Loading branch information
TangentFoxy committed Aug 3, 2016
1 parent 9aa798e commit 2a8be0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing.moon
Expand Up @@ -11,6 +11,9 @@ class extends lapis.Application
ngx.req.read_body!
body = ngx.req.get_body_data!
digest = hmac_sha1("secret", body)
hex_digest = ""
for b in digest\gfind "."
hex_digest ..= string.format("%02X", string.byte(b))
@html ->
pre "secret"
hr!
Expand All @@ -19,3 +22,5 @@ class extends lapis.Application
pre @req.headers["X-Hub-Signature"]
hr!
pre digest
hr!
pre hex_digest

0 comments on commit 2a8be0c

Please sign in to comment.