Python port of ShadowsocksR
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from __future__ import absolute_import, division, print_function, \
|
|
|
|
with_statement
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../'))
|
|
|
|
|
|
|
|
|
|
|
|
from shadowsocks.crypto import rc4_md5
|
|
|
|
from shadowsocks.crypto import openssl
|
|
|
|
from shadowsocks.crypto import sodium
|
|
|
|
from shadowsocks.crypto import table
|
|
|
|
|
|
|
|
def main():
|
|
|
|
print("\n""rc4_md5")
|
|
|
|
rc4_md5.test()
|
|
|
|
print("\n""aes-256-cfb")
|
|
|
|
openssl.test_aes_256_cfb()
|
|
|
|
print("\n""aes-128-cfb")
|
|
|
|
openssl.test_aes_128_cfb()
|
|
|
|
print("\n""rc4")
|
|
|
|
openssl.test_rc4()
|
|
|
|
print("\n""salsa20")
|
|
|
|
sodium.test_salsa20()
|
|
|
|
print("\n""chacha20")
|
|
|
|
sodium.test_chacha20()
|
|
|
|
print("\n""table")
|
|
|
|
table.test_encryption()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|
|
|
|
|