using System; using System.Collections.Generic; namespace Shadowsocks.Encryption.Stream { public class StreamPlainNativeEncryptor : StreamEncryptor { public StreamPlainNativeEncryptor(string method, string password) : base(method, password) { } protected override int CipherDecrypt(Span plain, Span cipher) { cipher.CopyTo(plain); return cipher.Length; } protected override int CipherEncrypt(Span plain, Span cipher) { plain.CopyTo(cipher); return plain.Length; } #region Cipher Info private static readonly Dictionary _ciphers = new Dictionary { {"plain", new CipherInfo("plain", 0, 0, CipherFamily.Plain) }, }; public static Dictionary SupportedCiphers() { return _ciphers; } protected override Dictionary getCiphers() { return _ciphers; } #endregion } }