Exemple #1
0
        internal TLSTCPClient( MainForm UseForm, TcpClient UseClient, string UseAddress )
        {
            MForm = UseForm;
            RemoteAddress = UseAddress;

            RawBuffer = new byte[RawBufferLength];
            TLSOuterRecordBuffer = new byte[MaximumTLSRecordLength + 5]; // Plus 5 for the header.

            LastTransactTime = new ECTime();
            LastTransactTime.SetToNow();

            if( UseClient == null )
              Client = new TcpClient();
            else
              Client = UseClient;

            try
            {
            NetStream = Client.GetStream();
            }
            catch( Exception Except )
              {
              MForm.ShowTLSListenerFormStatus( "Exception in Creating the NetStream:" );
              MForm.ShowTLSListenerFormStatus( Except.Message );
              NetStream = null;
              return;
              }

            Client.ReceiveTimeout = 3 * 1000;
            Client.SendTimeout = 3 * 1000;
            Client.SendBufferSize = 1024 * 32;
        }
Exemple #2
0
        internal MultiplyBits( MainForm UseForm )
        {
            MForm = UseForm;
            try
            {
            IntMath = new IntegerMath();
            // MForm.ShowStatus( IntMath.GetStatusString());

            InputOutputDictionary = new SortedDictionary<uint, uint>();

            Product = new Integer();
            TestProduct = new Integer();
            Factor1 = new Integer();
            Factor2 = new Integer();
            Quotient = new Integer();
            Remainder = new Integer();

            MultArray = new LineRec[MultArraySize];
            MultArrayCopyForMult2 = new LineRec[MultArraySize];
            for( int Count = 0; Count < MultArraySize; Count++ )
              {
              MultArray[Count].OneLine = new uint[MultArraySize];
              MultArrayCopyForMult2[Count].OneLine = new uint[MultArraySize];
              }

            SetupFermatLittle( 107 );

            }
            catch( Exception )
              {
              MForm.ShowStatus( "Not enough RAM for the MultArray." );
              }
        }
Exemple #3
0
        public WebTCPClient( MainForm UseForm, TcpClient UseClient, string UseAddress )
        {
            MForm = UseForm;
            RemoteAddress = UseAddress;

            LastTransactTime = new ECTime();
            LastTransactTime.SetToNow();
            LinesDictionary = new Dictionary<string, string>();

            if( UseClient == null )
              Client = new TcpClient();
            else
              Client = UseClient;

            try
            {
            NetStream = Client.GetStream();
            }
            catch( Exception Except )
              {
              MForm.ShowWebListenerFormStatus( "Exception in Creating the NetStream:" );
              MForm.ShowWebListenerFormStatus( Except.Message );
              NetStream = null;
              return;
              }

            Client.ReceiveTimeout = 3 * 1000;
            Client.SendTimeout = 3 * 1000;
            Client.SendBufferSize = 1024 * 32;
        }
Exemple #4
0
        internal LaPlataData( MainForm UseForm )
        {
            MForm = UseForm;

            LaPlataRecArray = new LaPlataRecord[8]; // It will resize it.
            SortIndexArray = new int[8];
        }
Exemple #5
0
        internal TLSClient( MainForm UseForm, TcpClient UseClient, string UseAddress )
        {
            MForm = UseForm;
            RemoteAddress = UseAddress;

            TLSTCPClient1 = new TLSTCPClient( MForm, UseClient, RemoteAddress );
        }
Exemple #6
0
        internal NetIPStatus( MainForm UseForm )
        {
            MForm = UseForm;

            IPsDictionary = new SortedDictionary<string, IPStatusRec>();
            RefererDictionary = new SortedDictionary<string, int>();
            UserAgentDictionary = new SortedDictionary<string, int>();
        }
        internal CustomerMessageForm( MainForm UseForm )
        {
            InitializeComponent();

            MForm = UseForm;

            GetX509BackgroundWorker.WorkerReportsProgress = true;
            GetX509BackgroundWorker.WorkerSupportsCancellation = true;
        }
        internal ImageDrawForm( MainForm UseForm )
        {
            InitializeComponent();
            MForm = UseForm;
            MultBits = new MultiplyBits( MForm );
            ImageBitmap = new Bitmap( MForm.GetMainScreenWidth(),
                              MForm.GetMainScreenHeight() );
                              // PixelFormat.Canonical ); // Default 24 bit color.

            DrawTimer.Interval = 200;
            DrawTimer.Start();
        }
        internal QuadResCombinBackground( MainForm UseForm, QuadResWorkerInfo WInfo )
        {
            MForm = UseForm;

            DoWork += new DoWorkEventHandler( QuadResCombinBackground_DoWork );
            ProgressChanged += new ProgressChangedEventHandler( QuadResCombinBackground_ProgressChanged );
            RunWorkerCompleted += new RunWorkerCompletedEventHandler( QuadResCombinBackground_RunWorkerCompleted );

            WorkerReportsProgress = true;
            WorkerSupportsCancellation = true;

            ProcessName = WInfo.ProcessName;
        }
        internal FactorDictionary( MainForm UseForm )
        {
            MForm = UseForm;
            IntMath = new IntegerMath();
            Product = new Integer();
            SolutionP = new Integer();
            SolutionQ = new Integer();
            Quotient = new Integer();
            Remainder = new Integer();

            MainDictionary = new SortedDictionary<uint, ListRec>();
            NumberList = new List<NumberRec>();
        }
Exemple #11
0
        internal ConfigureFile( MainForm UseForm, string FileToUseName )
        {
            MForm = UseForm;
            FileName = FileToUseName;
            AESEncrypt = new AESEncryption();
            string ExampleKey = "Where does this key come from on a production server" +
              " that is running on an Amazon EC2 instance (for example) where you don't" +
              " have access to the physical hardware?";

            AESEncrypt.SetKey( ExampleKey );

            CDictionary = new Dictionary<string, string>();
            ReadFromTextFile();
        }
        internal TLSListenerForm( MainForm UseForm )
        {
            InitializeComponent();

            MForm = UseForm;

            DNSBackgroundWorker.WorkerReportsProgress = true;
            DNSBackgroundWorker.WorkerSupportsCancellation = true;

            ClientsLast = 0;
            // It will resize this as it needs more.
            Clients = new TLSClient[8];

            Listener = new TcpListener( IPAddress.Any, 443 );
            Listener.ExclusiveAddressUse = true;

            ECTime RightNow = new ECTime();
            RightNow.SetToNow();
            UniqueEntityTag = RightNow.GetIndex(); // Start it with something new.
        }
Exemple #13
0
        internal FermatLittle( MainForm UseForm )
        {
            MForm = UseForm;

            IntMath = new IntegerMath();
        }
        internal QuadResSearchForm( MainForm UseForm )
        {
            InitializeComponent();

            MForm = UseForm;
        }
 internal DomainX509Data( MainForm UseForm, string FileToUseName )
 {
     MForm = UseForm;
     FileName = FileToUseName;
     DomainX509RecArray = new DomainX509Record[8]; // It will resize it.
 }
Exemple #16
0
 internal LaPlataRecord( MainForm UseForm )
 {
     MForm = UseForm;
 }
Exemple #17
0
 internal WebFilesData( MainForm UseForm )
 {
     MForm = UseForm;
     WebFilesDictionary = new SortedDictionary<string, WebFilesRec>();
 }