Beispiel #1
0
        public void EncoidingMessage()
        {
            int S  = Helpers.Randomize(1, 6);
            int S1 = Helpers.Randomize(1, 5);

            do
            {
                S1 = Helpers.Randomize(1, 5);
            }while (S == S1);
            int S2 = Helpers.Randomize(1, 2);

            CipherStrModel    cipher_1 = new CipherStrModel();
            CipherStrModel    cipher_2 = new CipherStrModel();
            CipherStrIntModel cipher_3 = new CipherStrIntModel();

            cipher_1 = FindCipherStr(S);
            cipher_2 = FindCipherStr(S1);
            cipher_3 = FindCipherStrInt(S2);


            Message    = cipher_1.Encode(Message);
            Message    = cipher_2.Encode(Message);
            Message    = cipher_3.Encode(Message, (cipher_3.GetCode.ToString().Contains("F")? Helpers.Randomize(3, 6) : Helpers.Randomize(7, 19)));
            Message   += ".";
            PrivateKey = CreatePrivateKey(cipher_1, cipher_2, cipher_3);
            PublicKey  = CreatePublicKey(PrivateKey, FindCipherStr(S));

            FileManagement fileManagement = new FileManagement(Message, PrivateKey, PublicKey);

            fileManagement.CreateEncodedFile();

            End e = new End(PublicKey, PrivateKey, Message);

            e.EndEncode();
        }