private void cifrarBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cifrarBActionPerformed
        String log = "";
        String c;
        String m = plaintextTF.getText();
        System.out.println("m: "+m);
        log += "\n Message to cipher: "+m;
        ArrayList<Integer> c_ascii = new ArrayList<>();
        ArrayList<Integer> m_ascii = new ArrayList<>();
        for(int i=0;i<m.length();i++){
            m_ascii.add((int)m.charAt(i));
        }
        c_ascii = cipher.cipher(m_ascii);
        m_ascii = cipher.decipher(c_ascii);
        log += "\n p: "+ cipher.key.getP().toString()
             + "\n q: "+ cipher.key.getQ().toString()
             + "\n n: "+ cipher.key.getN().toString()
             + "\n phi: "+ cipher.key.getPhi().toString()
             + "\n e: "+ cipher.key.getE().toString()
             + "\n d: "+ cipher.key.getD().toString();
        
        m="";
        c="";
        for(int i= 0; i<m_ascii.size();i++){
            int j =m_ascii.get((i));
            m += (char)j;
        }
        for(int i= 0; i<c_ascii.size();i++){
            int j =c_ascii.get((i));
            c += (char)j;
        }
        System.out.println("c: "+c);
        System.out.println("m: "+m);
        key1TF.setText(cipher.key.getE().toString());
        key1TF1.setText(cipher.key.getD().toString());
        cipherTextTF.setText(c);
        decipherTextTF.setText(m);
        textArea.setText(log);
    }//GEN-LAST:event_cifrarBActionPerformed