MCPcopy
hub / github.com/shadowsocks/shadowsocks / init_table

Function init_table

shadowsocks/crypto/table.py:49–54  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

47
48
49def init_table(key):
50 if key not in cached_tables:
51 encrypt_table = b''.join(get_table(key))
52 decrypt_table = maketrans(encrypt_table, maketrans(b'', b''))
53 cached_tables[key] = [encrypt_table, decrypt_table]
54 return cached_tables[key]
55
56
57class TableCipher(object):

Callers 1

__init__Method · 0.85

Calls 1

get_tableFunction · 0.85

Tested by

no test coverage detected