Renci.SshNet.Security.Cryptography.Ciphers.Arc4Cipher.Arc4Cipher C# (CSharp) Method

Arc4Cipher() public method

Initializes a new instance of the Arc4Cipher class.
is null.
public Arc4Cipher ( byte key, bool dischargeFirstBytes ) : System
key byte The key.
dischargeFirstBytes bool if set to true will disharged first 1536 bytes.
return System
        public Arc4Cipher(byte[] key, bool dischargeFirstBytes)
            : base(key)
        {
            _workingKey = key;
            SetKey(_workingKey);
            //   The first 1536 bytes of keystream
            //   generated by the cipher MUST be discarded, and the first byte of the
            //   first encrypted packet MUST be encrypted using the 1537th byte of
            //   keystream.
            if (dischargeFirstBytes)
                Encrypt(new byte[1536]);
        }