diff --git a/onionr/core.py b/onionr/core.py index 017c7562..a1348279 100644 --- a/onionr/core.py +++ b/onionr/core.py @@ -272,6 +272,8 @@ class Core: ''' data = data hasher = hashlib.sha3_256() + if not type(data) is bytes: + data = data.encode() hasher.update(data) dataHash = hasher.hexdigest() if type(dataHash) is bytes: