|
@@ -34,7 +34,7 @@ def blake_file(path: str, person: bytes = None, root: str ='rest/static') -> byt
|
|
fd = os.open(f'{root}/{path}', os.O_RDONLY, 0o600)
|
|
fd = os.open(f'{root}/{path}', os.O_RDONLY, 0o600)
|
|
with open(fd, "rb") as f:
|
|
with open(fd, "rb") as f:
|
|
f.seek(0)
|
|
f.seek(0)
|
|
- _blake = blake2b(usedforsecurity=False, digest_size=DIGEST_SIZE_BYTES, person='upload'.encode('utf-8'))
|
|
|
|
|
|
+ _blake = blake2b(usedforsecurity=False, digest_size=DIGEST_SIZE_BYTES, person=person)
|
|
while f.peek(1):
|
|
while f.peek(1):
|
|
_blake.update(f.read(1024))
|
|
_blake.update(f.read(1024))
|
|
return _blake.digest()
|
|
return _blake.digest()
|