diff options
author | Anthony Wang | 2023-01-18 20:06:17 +0000 |
---|---|---|
committer | Anthony Wang | 2023-01-18 20:06:17 +0000 |
commit | 315b1c635c584dbd4b7b55c0c2d8e622dbb37862 (patch) | |
tree | 64d7ee42acb0891e58e91a79f27a0eeeaa7a47d0 /client.py | |
parent | 183267030d756936ae90e8b6cc646a378fe79ff1 (diff) |
More code cleanup
Diffstat (limited to 'client.py')
-rw-r--r-- | client.py | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -17,11 +17,7 @@ message = f'date: {date}\ndigest: SHA-256={digest}' with open('private.pem', 'rb') as f: privkey = serialization.load_pem_private_key(f.read(), None) -signature = b64encode(privkey.sign( - message.encode('utf8'), - padding.PKCS1v15(), - hashes.SHA256() -)).decode() +signature = b64encode(privkey.sign(message.encode('utf8'), padding.PKCS1v15(), hashes.SHA256())).decode() header = f'keyId="https://0.exozy.me/users/test.jsonld#main-key",headers="date digest",signature="{signature}"' resp = post('https://0.exozy.me/users/test.outbox', headers={ |