fix all linting for pylint3

This commit is contained in:
Jacob Plaster
2018-12-18 11:28:04 +00:00
parent 4ef8be144b
commit 0c9a0fadbc
33 changed files with 2505 additions and 1687 deletions

View File

@@ -1,8 +1,18 @@
"""
This module is used to house all of the functions which are used
to handle the http authentication of the client
"""
import hashlib
import hmac
import time
def generate_auth_payload(API_KEY, API_SECRET):
"""
Generate a signed payload
@return json Oject headers
"""
nonce = _gen_nonce()
authMsg, sig = _gen_signature(API_KEY, API_SECRET, nonce)
@@ -15,6 +25,9 @@ def generate_auth_payload(API_KEY, API_SECRET):
}
def generate_auth_headers(API_KEY, API_SECRET, path, body):
"""
Generate headers for a signed payload
"""
nonce = str(_gen_nonce())
signature = "/api/v2/{}{}{}".format(path, nonce, body)
h = hmac.new(API_SECRET.encode('utf8'), signature.encode('utf8'), hashlib.sha384)