forked from mirrors/bookwyrm
Use the correct digest algorithm. (Fixes: #191)
This commit is contained in:
parent
9f894c1622
commit
1b2fb445ca
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ def make_signature(sender, destination, date, digest):
|
|||
return ','.join('%s="%s"' % (k, v) for (k, v) in signature.items())
|
||||
|
||||
def make_digest(data):
|
||||
return 'SHA-256=' + b64encode(hashlib.sha512(data).digest()).decode('utf-8')
|
||||
return 'SHA-256=' + b64encode(hashlib.sha256(data).digest()).decode('utf-8')
|
||||
|
||||
def verify_digest(request):
|
||||
algorithm, digest = request.headers['digest'].split('=', 1)
|
||||
|
|
Loading…
Reference in a new issue