17 lines
431 B
C#
17 lines
431 B
C#
|
|
namespace shadowsocks_csharp.Encrypt
|
|
{
|
|
public static class EncryptorFactory
|
|
{
|
|
public static IEncryptor GetEncryptor(string method, string password)
|
|
{
|
|
if (string.IsNullOrEmpty(method) || method.ToLowerInvariant() == "table")
|
|
{
|
|
return new TableEncryptor(method, password);
|
|
}
|
|
|
|
return new OpensslEncryptor(method, password);
|
|
}
|
|
}
|
|
}
|