MCPcopy Index your code
hub / github.com/shadowsocks/shadowsocks / __init__

Method __init__

shadowsocks/encrypt.py:72–87  ·  view source on GitHub ↗
(self, password, method)

Source from the content-addressed store, hash-verified

70
71class Encryptor(object):
72 def __init__(self, password, method):
73 self.password = password
74 self.key = None
75 self.method = method
76 self.iv_sent = False
77 self.cipher_iv = b''
78 self.decipher = None
79 self.decipher_iv = None
80 method = method.lower()
81 self._method_info = self.get_method_info(method)
82 if self._method_info:
83 self.cipher = self.get_cipher(password, method, 1,
84 random_string(self._method_info[1]))
85 else:
86 logging.error('method %s not supported' % method)
87 sys.exit(1)
88
89 def get_method_info(self, method):
90 method = method.lower()

Callers

nothing calls this directly

Calls 3

get_method_infoMethod · 0.95
get_cipherMethod · 0.95
random_stringFunction · 0.85

Tested by

no test coverage detected