aboutsummaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
authorAnthony Wang2023-01-18 18:55:53 +0000
committerAnthony Wang2023-01-18 18:55:53 +0000
commit60bf76a75e105981782c81d6eec693c5990383a9 (patch)
tree81b76752c2506ecb1ef7671961db6a01033069c1 /client.py
parent6900034f2e81831a07bd7ff1928067de4ebd4814 (diff)
Minor code tweaks
Diffstat (limited to 'client.py')
-rw-r--r--client.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/client.py b/client.py
index 0a3305d..346881b 100644
--- a/client.py
+++ b/client.py
@@ -5,11 +5,10 @@ from email.utils import formatdate
from requests import post
from sys import argv
-date = formatdate(usegmt=True)
-
with open(argv[1], 'rb') as f:
activity = f.read()
+date = formatdate(usegmt=True)
digester = hashes.Hash(hashes.SHA256())
digester.update(activity)
digest = b64encode(digester.finalize()).decode()