convert data to bytes if it isnt
This commit is contained in:
parent
7578ac874b
commit
c807056ef2
@ -272,6 +272,8 @@ class Core:
|
|||||||
'''
|
'''
|
||||||
data = data
|
data = data
|
||||||
hasher = hashlib.sha3_256()
|
hasher = hashlib.sha3_256()
|
||||||
|
if not type(data) is bytes:
|
||||||
|
data = data.encode()
|
||||||
hasher.update(data)
|
hasher.update(data)
|
||||||
dataHash = hasher.hexdigest()
|
dataHash = hasher.hexdigest()
|
||||||
if type(dataHash) is bytes:
|
if type(dataHash) is bytes:
|
||||||
|
Loading…
Reference in New Issue
Block a user