add salsa20 and chacha20
This commit is contained in:
parent
9d33a59b60
commit
e6416562fc
2 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,7 @@ from __future__ import absolute_import, division, print_function, \
|
||||||
with_statement
|
with_statement
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from ctypes import CDLL, c_char_p, c_int, c_long, c_ulonglong, byref, \
|
from ctypes import CDLL, c_char_p, c_int, c_ulonglong, byref, \
|
||||||
create_string_buffer, c_void_p
|
create_string_buffer, c_void_p
|
||||||
|
|
||||||
__all__ = ['ciphers']
|
__all__ = ['ciphers']
|
||||||
|
|
|
@ -28,13 +28,15 @@ import sys
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from shadowsocks.crypto import m2, rc4_md5, salsa20_ctr, ctypes_openssl, table
|
from shadowsocks.crypto import m2, rc4_md5, salsa20_ctr,\
|
||||||
|
ctypes_openssl, ctypes_libsodium, table
|
||||||
|
|
||||||
|
|
||||||
method_supported = {}
|
method_supported = {}
|
||||||
method_supported.update(rc4_md5.ciphers)
|
method_supported.update(rc4_md5.ciphers)
|
||||||
method_supported.update(salsa20_ctr.ciphers)
|
method_supported.update(salsa20_ctr.ciphers)
|
||||||
method_supported.update(ctypes_openssl.ciphers)
|
method_supported.update(ctypes_openssl.ciphers)
|
||||||
|
method_supported.update(ctypes_libsodium.ciphers)
|
||||||
# let M2Crypto override ctypes_openssl
|
# let M2Crypto override ctypes_openssl
|
||||||
method_supported.update(m2.ciphers)
|
method_supported.update(m2.ciphers)
|
||||||
method_supported.update(table.ciphers)
|
method_supported.update(table.ciphers)
|
||||||
|
|
Loading…
Reference in a new issue