zoukankan      html  css  js  c++  java
  • Java小项目之:文件的加密与解密!再也不怕存的小电影被别人发现了!

    Java小项目之:文件的加密与解密!再也不怕存的小电影被别人发现了!

    今天带来的java小项目是加密解密系统,再也不怕别人偷看自己的电脑了,也可以正大光明的存小电影了。减少借别人电脑被看隐私的尴尬,从这个项目开始!

    界面展示:

     

    部分代码展示:

    package wt.diy.encryption.gui;

    import java.io.File;

    import javax.swing.JFileChooser;

    import javax.swing.JFrame;

    import javax.swing.JOptionPane;

    import wt.diy.encryption.service.ServiceContext;

    public class Context {

    ServiceContext service;

    EncryptionFrame frame;

    public Context(ServiceContext service) {

    this.service = service;

    }

    public void setFrame(EncryptionFrame frame) {

    this.frame = frame;

    }

    public void excute(String source,String destiny, String key,JFrame frame) {

    File file = new File(destiny);

    if(!this.frame.getRadio().isSelected()&&file.exists()){

    JOptionPane.showMessageDialog(frame, “文件已经存在”);

    return ;

    }

    service.excute(source, destiny, key);

    }

    public void showMe(){

    frame.setVisible(true);

    }

    public String open(JFrame frame) {

    JFileChooser jfc = new JFileChooser();

    jfc.showOpenDialog(frame);

    File f = jfc.getSelectedFile();

    return f.getAbsolutePath();

    }

    }

    喜欢这样文章的可以关注我,我会持续更新,你们的关注是我更新的动力!需要更多java学习资料的也可以私信我!

    祝关注我的人都:身体健康,财源广进,福如东海,寿比南山,早生贵子,从不掉发!

     

  • 相关阅读:
    Action/Service/DAO简介 一
    Python中的Nonetype类型怎么判断?
    idea 中使用maven命令
    python-字符串中含有变量的表示方法
    python-configparser模块,读取配置文件
    python json 和 dict
    python interpreter解释器设置
    python写入数据到excel-xlwt模块(不能修改,每次写入全覆盖)
    pymongo问题集合
    excel表操作使用记录
  • 原文地址:https://www.cnblogs.com/heqingxiaohuo/p/12273621.html
Copyright © 2011-2022 走看看