Esempio n. 1
0
    private void Show_iteration()
    {
        int temp_iteration = current_iteration + 1;

        if (cipher_state == Cipher_State.Encryption)
        {
            title_text.text = Text_Data.Get_encrypted_text() + Text_Data.Get_round_text() + temp_iteration.ToString();
        }
        else
        {
            title_text.text = Text_Data.Get_decrypted_text() + Text_Data.Get_round_text() + temp_iteration.ToString();
        }

        work_bits     = laundry_data.Get_work_bits();
        end_of_blocks = false;
        current_block = 0;
        current_iteration++;

        if (current_iteration >= number_of_iterations)
        {
            end_of_iteration = true;
        }

        Set_current(work_bits, Calculate_sqrt_floor(work_bits.Length));
        Create_img(current_bits, currnet_sqtr_size);
    }
Esempio n. 2
0
    //=== CIPHER =====================================================================================================================================================

    private void Show_block()
    {
        int temp_round = current_iteration + 1;
        int temp_block = current_block + 1;

        if (cipher_state == Cipher_State.Encryption)
        {
            title_text.text = Text_Data.Get_encrypted_text() + Text_Data.Get_round_text() + temp_round.ToString() + Text_Data.Get_block_text() + temp_block.ToString();
        }
        else
        {
            title_text.text = Text_Data.Get_decrypted_text() + Text_Data.Get_round_text() + temp_round.ToString() + Text_Data.Get_block_text() + temp_block.ToString();
        }

        BitArray bits_temp = Calculate_block();

        Set_current(bits_temp, Calculate_sqrt_floor(bits_temp.Length));
        Create_img(current_bits, currnet_sqtr_size);
    }