This commit is contained in:
meejah 2019-06-25 14:35:25 -06:00
parent 5ce01ad9c1
commit 5633f3a8ff
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ class DecryptingConsumer(object):
iv = binascii.unhexlify("%032x" % offset_big)
self._decryptor = aes.create_decryptor(readkey, iv)
# this is just to advance the counter
aes.decrypt_data(self._decryptor, "\x00" * offset_small)
aes.decrypt_data(self._decryptor, b"\x00" * offset_small)
def set_download_status_read_event(self, read_ev):
self._read_ev = read_ev

View File

@ -46,9 +46,9 @@ def unsign_from_foolscap(ann_t):
(msg, sig_vs, claimed_key_vs) = ann_t
if not sig_vs or not claimed_key_vs:
raise UnknownKeyError("only signed announcements recognized")
if not sig_vs.startswith("v0-"):
if not sig_vs.startswith(b"v0-"):
raise UnknownKeyError("only v0- signatures recognized")
if not claimed_key_vs.startswith("v0-"):
if not claimed_key_vs.startswith(b"v0-"):
raise UnknownKeyError("only v0- keys recognized")
claimed_key = ed25519.verifying_key_from_string(b"pub-" + claimed_key_vs)