private void generateMD5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateMD5ActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonMenuItem2.isSelected()) {
            JFileChooser fileChooser = new JFileChooser();
            fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(false);
            int showOpenDialog = fileChooser.showOpenDialog(this);
            if (showOpenDialog == JFileChooser.CANCEL_OPTION) {
                return;
            }
            jTextArea1.setText(generateIdentity(fileChooser.getSelectedFile()));
            return;
        } 
        try {
            byte[] digest = MessageDigest.getInstance("MD5").digest(sourceData());
            jTextArea1.setText(new String(Hex.encodeHex(digest)));
        } catch (NoSuchAlgorithmException ex) {
            Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
//        if (jRadioButtonMenuItem1.isSelected()) {
//            try {
//                byte[] digest = MessageDigest.getInstance("MD5").digest(jTextArea1.getText().getBytes("UTF-8"));
//                jTextArea1.setText(new String(Hex.encodeHex(digest)));
//            } catch (NoSuchAlgorithmException ex) {
//                Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
//            } catch (UnsupportedEncodingException ex) {
//                Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
//            }
//        }

    }//GEN-LAST:event_generateMD5ActionPerformed