This commit is contained in:
Gang Zhuo
2015-09-25 04:42:56 -04:00
parent c5e27486fb
commit 098640e792
10 changed files with 85 additions and 64 deletions
@@ -8,16 +8,18 @@ namespace Shadowsocks.Encryption
{
public const int MAX_INPUT_SIZE = 32768;
protected EncryptorBase(string method, string password, bool onetimeauth)
protected EncryptorBase(string method, string password, bool onetimeauth, bool isudp)
{
Method = method;
Password = password;
OnetimeAuth = onetimeauth;
IsUDP = isudp;
}
protected string Method;
protected string Password;
protected bool OnetimeAuth;
protected bool IsUDP;
protected byte[] GetPasswordHash()
{
@@ -26,7 +28,7 @@ namespace Shadowsocks.Encryption
return hash;
}
public abstract void Encrypt(byte[] buf, int length, byte[] outbuf, out int outlength, bool udp);
public abstract void Encrypt(byte[] buf, int length, byte[] outbuf, out int outlength);
public abstract void Decrypt(byte[] buf, int length, byte[] outbuf, out int outlength);