This commit is contained in:
clowwindy
2014-11-02 18:38:00 +08:00
parent 421554f8ec
commit 237a026914
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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));