Package com.jprotectfile.model

Examples of com.jprotectfile.model.FileEncryptor


    this.jbDecrypt.setEnabled(false);
    this.bar.setIndeterminate(true);
   
    Thread runner = new Thread(){
      public void run(){
        FileEncryptor enc = new FileEncryptor(new String(MainView.this.jtfPassword.getPassword()));
        File inputFile = new File(MainView.this.jtfInputFile.getText());
        File outputFile = new File(MainView.this.jtfOutputFile.getText());
        try {
          FileInputStream file1 = new FileInputStream(inputFile);
          FileOutputStream file2 = new FileOutputStream(outputFile);
          enc.encrypt(file1, file2);
        } catch (Exception e) {
          JOptionPane.showMessageDialog(MainView.this, "Erro em criptografar: "+e.getMessage());
        }
        MainView.this.jbEncrypt.setEnabled(true);
        MainView.this.jbDecrypt.setEnabled(true);
View Full Code Here


    this.jbDecrypt.setEnabled(false);
    this.bar.setIndeterminate(true);
   
    Thread runner = new Thread(){
      public void run(){
        FileEncryptor enc = new FileEncryptor(new String(MainView.this.jtfPassword.getPassword()));
        File inputFile = new File(MainView.this.jtfInputFile.getText());
        File outputFile = new File(MainView.this.jtfOutputFile.getText());
        try {
          FileInputStream file1 = new FileInputStream(inputFile);
          FileOutputStream file2 = new FileOutputStream(outputFile);
          enc.decrypt(file1, file2);
        } catch (Exception e) {
          JOptionPane.showMessageDialog(MainView.this, "Erro em descriptografar: "+e.getMessage());
        }
        MainView.this.jbEncrypt.setEnabled(true);
        MainView.this.jbDecrypt.setEnabled(true);
View Full Code Here

TOP

Related Classes of com.jprotectfile.model.FileEncryptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.