Remove sha1 sum function
This commit is contained in:
parent
f7fd445c73
commit
ee631730c7
1 changed files with 0 additions and 9 deletions
|
@ -3,15 +3,6 @@ import os
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
|
|
||||||
def sha1sum(file, blocksize=65536):
|
|
||||||
if hasattr(file, "endswith"): # Its a string open it
|
|
||||||
file = open(file, "rb")
|
|
||||||
hash = hashlib.sha1()
|
|
||||||
for block in iter(lambda: file.read(blocksize), ""):
|
|
||||||
hash.update(block)
|
|
||||||
return hash.hexdigest()
|
|
||||||
|
|
||||||
|
|
||||||
def sha512sum(file, blocksize=65536, format="hexdigest"):
|
def sha512sum(file, blocksize=65536, format="hexdigest"):
|
||||||
if type(file) is str: # Filename specified
|
if type(file) is str: # Filename specified
|
||||||
file = open(file, "rb")
|
file = open(file, "rb")
|
||||||
|
|
Loading…
Reference in a new issue