very simply version

This commit is contained in:
2021-09-05 15:56:53 +08:00
parent fa851ed751
commit 25dbdcdb24
12 changed files with 373 additions and 0 deletions

12
game_backuper/hashl.py Normal file
View File

@@ -0,0 +1,12 @@
from hashlib import sha512 as _sha512
from base64 import b85encode
from typing import BinaryIO
def sha512(b: BinaryIO):
s = _sha512()
t = b.read(1024)
while len(t) > 0:
s.update(t)
t = b.read(1024)
return b85encode(s.digest()).decode()