mirror of
https://github.com/morgan9e/noiseprotocol
synced 2026-04-14 00:14:05 +09:00
Removing variable annotations for python 3.5 compatibility... again.
This commit is contained in:
@@ -31,15 +31,15 @@ class NoiseProtocol(object):
|
||||
if self.pattern_modifiers:
|
||||
self.pattern.apply_pattern_modifiers(pattern_modifiers)
|
||||
|
||||
self.dh_fn: 'DH' = mappings['dh']
|
||||
self.cipher_fn: 'Cipher' = mappings['cipher']
|
||||
self.hash_fn: 'Hash' = mappings['hash']
|
||||
self.dh_fn = mappings['dh']
|
||||
self.cipher_fn = mappings['cipher']
|
||||
self.hash_fn = mappings['hash']
|
||||
|
||||
self.psks: list = None # Placeholder for PSKs
|
||||
self.psks = None # Placeholder for PSKs
|
||||
|
||||
self.handshake_state: 'HandshakeState' = Empty()
|
||||
self.symmetric_state: 'SymmetricState' = Empty()
|
||||
self.cipher_state: 'CipherState' = Empty()
|
||||
self.handshake_state = Empty()
|
||||
self.symmetric_state = Empty()
|
||||
self.cipher_state = Empty()
|
||||
|
||||
def _parse_protocol_name(self) -> Tuple[dict, list]:
|
||||
unpacked = self.name.decode().split('_')
|
||||
|
||||
@@ -10,13 +10,13 @@ class Pattern(object):
|
||||
# As per specification, if both parties have pre-messages, the initiator is listed first. To reduce complexity,
|
||||
# pre_messages shall be a list of two lists:
|
||||
# the first for the initiator's pre-messages, the second for the responder
|
||||
pre_messages: List[list] = [
|
||||
pre_messages = [
|
||||
[],
|
||||
[]
|
||||
]
|
||||
|
||||
# List of lists of valid tokens, alternating between tokens for initiator and responder
|
||||
tokens: List[list] = []
|
||||
tokens = []
|
||||
|
||||
def __init__(self):
|
||||
self.has_pre_messages = any(map(lambda x: len(x) > 0, self.pre_messages))
|
||||
|
||||
Reference in New Issue
Block a user