MCPcopy
hub / github.com/shadowsocks/shadowsocks / create_cipher

Function create_cipher

shadowsocks/crypto/rc4_md5.py:27–33  ·  view source on GitHub ↗
(alg, key, iv, op, key_as_bytes=0, d=None, salt=None,
                  i=1, padding=1)

Source from the content-addressed store, hash-verified

25
26
27def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None,
28 i=1, padding=1):
29 md5 = hashlib.md5()
30 md5.update(key)
31 md5.update(iv)
32 rc4_key = md5.digest()
33 return openssl.OpenSSLCrypto(b'rc4', rc4_key, b'', op)
34
35
36ciphers = {

Callers 1

testFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected