mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 07:31:07 +00:00
bytes
This commit is contained in:
parent
5ce01ad9c1
commit
5633f3a8ff
@ -203,7 +203,7 @@ class DecryptingConsumer(object):
|
|||||||
iv = binascii.unhexlify("%032x" % offset_big)
|
iv = binascii.unhexlify("%032x" % offset_big)
|
||||||
self._decryptor = aes.create_decryptor(readkey, iv)
|
self._decryptor = aes.create_decryptor(readkey, iv)
|
||||||
# this is just to advance the counter
|
# 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):
|
def set_download_status_read_event(self, read_ev):
|
||||||
self._read_ev = read_ev
|
self._read_ev = read_ev
|
||||||
|
@ -46,9 +46,9 @@ def unsign_from_foolscap(ann_t):
|
|||||||
(msg, sig_vs, claimed_key_vs) = ann_t
|
(msg, sig_vs, claimed_key_vs) = ann_t
|
||||||
if not sig_vs or not claimed_key_vs:
|
if not sig_vs or not claimed_key_vs:
|
||||||
raise UnknownKeyError("only signed announcements recognized")
|
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")
|
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")
|
raise UnknownKeyError("only v0- keys recognized")
|
||||||
|
|
||||||
claimed_key = ed25519.verifying_key_from_string(b"pub-" + claimed_key_vs)
|
claimed_key = ed25519.verifying_key_from_string(b"pub-" + claimed_key_vs)
|
||||||
|
Loading…
Reference in New Issue
Block a user