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, ReadOnlySpan cipher) { cipher.CopyTo(plain); return cipher.Length; } protected override int CipherEncrypt(ReadOnlySpan 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) }, {"none", new CipherInfo("none", 0, 0, CipherFamily.Plain) }, }; public static Dictionary SupportedCiphers() { return _ciphers; } protected override Dictionary GetCiphers() { return _ciphers; } #endregion } }