Merge pull request #16 from mengskysama/master

Encryptor bugfix
This commit is contained in:
clowwindy
2014-09-23 14:06:30 +08:00
2 changed files with 6 additions and 6 deletions
@@ -13,7 +13,7 @@ namespace shadowsocks_csharp.Encrypt
public OpensslEncryptor(string method, string password)
: base(method, password)
{
InitKey(Method, Password);
InitKey(method, password);
}
public override byte[] Encrypt(byte[] buf, int length)
@@ -79,7 +79,7 @@ namespace shadowsocks_csharp.Encrypt
private IntPtr _encryptCtx;
private IntPtr _decryptCtx;
private void InitKey(string password, string method)
private void InitKey(string method, string password)
{
string k = method + ":" + password;
if (CachedKeys.ContainsKey(k))
+4 -4
View File
@@ -54,10 +54,10 @@ namespace shadowsocks_csharp
// Get the socket that handles the client request.
Socket listener = (Socket)ar.AsyncState;
if (!listener.Connected)
{
return;
}
//if (!listener.Connected)
//{
// return;
//}
listener.BeginAccept(
new AsyncCallback(AcceptCallback),