refine
This commit is contained in:
@@ -48,7 +48,7 @@ namespace shadowsocks_csharp
|
||||
{
|
||||
server = "127.0.0.1",
|
||||
server_port = 8388,
|
||||
local_port = 1081,
|
||||
local_port = 1080,
|
||||
password = "barfoo!",
|
||||
method = "table",
|
||||
isDefault = true
|
||||
|
||||
@@ -14,7 +14,13 @@ namespace shadowsocks_csharp.Encrypt
|
||||
{"aes-256-cfb", new int[]{32, 16}},
|
||||
{"bf-cfb", new int[]{16, 8}},
|
||||
{"rc4", new int[]{16, 0}},
|
||||
};
|
||||
};
|
||||
|
||||
static OpensslEncryptor()
|
||||
{
|
||||
OpenSSL.OpenSSL_add_all_ciphers();
|
||||
}
|
||||
|
||||
public OpensslEncryptor(string method, string password)
|
||||
: base(method, password)
|
||||
{
|
||||
@@ -85,7 +91,6 @@ namespace shadowsocks_csharp.Encrypt
|
||||
|
||||
private void InitKey(string method, string password)
|
||||
{
|
||||
OpenSSL.OpenSSL_add_all_ciphers();
|
||||
method = method.ToLower();
|
||||
string k = method + ":" + password;
|
||||
_cipher = OpenSSL.EVP_get_cipherbyname(System.Text.Encoding.UTF8.GetBytes(method));
|
||||
|
||||
Reference in New Issue
Block a user