/// <summary>
        /// Create a KileClient instance.
        /// </summary>
        /// <param name="domain">The realm part of the client's principal identifier.
        /// This argument cannot be null.</param>
        /// <param name="cName">The account to logon the remote machine. Either user account or computer account
        /// This argument cannot be null.</param>
        /// <param name="password">The password of the user. This argument cannot be null.</param>
        /// <param name="accountType">The type of the logon account. User or Computer</param>
        /// <exception cref="System.ArgumentNullException">Thrown when the input parameter is null.</exception>
        public KileClient(string domain, string cName, string password, KileAccountType accountType)
        {
            if (domain == null)
            {
                throw new ArgumentNullException("domain");
            }
            if (cName == null)
            {
                throw new ArgumentNullException("cName");
            }
            if (password == null)
            {
                throw new ArgumentNullException("password");
            }

            context             = new KileClientContext();
            decoder             = new KileDecoder(context);
            transportBufferSize = ConstValue.TRANSPORT_BUFFER_SIZE;
            this.domain         = domain;
            this.userName       = cName;
            this.password       = password;

            context.Password = password;
            context.Salt     = GenerateSalt(domain, cName, accountType);
        }
Beispiel #2
0
 /// <summary>
 /// Kile Decoder Constructor
 /// </summary>
 /// <param name="clientContext">Kile Client Context</param>
 internal KileDecoder(KileClientContext clientContext)
 {
     this.clientContext = clientContext;
     isClientRole       = true;
 }