very simply version
This commit is contained in:
12
game_backuper/hashl.py
Normal file
12
game_backuper/hashl.py
Normal 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()
|
||||
Reference in New Issue
Block a user