Preliminary Python3 support

This commit is contained in:
Mark Qvist 2020-04-22 12:07:13 +02:00
parent 9f8da39614
commit a339ae3d28
17 changed files with 356 additions and 259 deletions

View file

@ -54,7 +54,7 @@ class Destination:
# Create a digest for the destination
digest = hashes.Hash(hashes.SHA256(), backend=default_backend())
digest.update(name)
digest.update(name.encode("UTF-8"))
return digest.finalize()[:10]
@ -83,7 +83,7 @@ class Destination:
self.name = Destination.getDestinationName(app_name, *aspects)
self.hash = Destination.getDestinationHash(app_name, *aspects)
self.hexhash = self.hash.encode("hex_codec")
self.hexhash = self.hash.hex()
self.callback = None
self.proofcallback = None