Encryptor bugfix

This commit is contained in:
mengskysama
2014-09-23 11:23:39 +08:00
parent ffc8411c45
commit 3d260ca9c0
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),