Function
sign
(url, data={}, method="GET", secret="", token="", hash=HMAC_SHA1)
Source from the content-addressed store, hash-verified
| 70 | return base |
| 71 | |
| 72 | def sign(url, data={}, method="GET", secret="", token="", hash=HMAC_SHA1): |
| 73 | # HMAC-SHA1 signature algorithm: http://tools.ietf.org/html/rfc5849#section-3.4.2 |
| 74 | signature = escape(utf8(secret)) + "&" + escape(utf8(token)) |
| 75 | signature = hash(signature, base(url, data, method)) |
| 76 | signature = base64.b64encode(signature) |
| 77 | return signature |
| 78 | |
| 79 | #CONSUMER_KEY = "" |
| 80 | #CONSUMER_SECRET = "" |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…