欢迎来到天天文库
浏览记录
ID:14347359
大小:69.50 KB
页数:32页
时间:2018-07-28
《排列码加密解密源程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、排列码加密解密源程序//新建的class类名称为EncryPLimportjava.awt.Color;importjava.awt.Dimension;importjava.awt.Toolkit;importjava.awt.event.MouseAdapter;importjava.awt.event.MouseEvent;importjava.io.BufferedWriter;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileNotFoundException;imp
2、ortjava.io.FileOutputStream;importjava.io.FileReader;importjava.io.FileWriter;importjava.io.PrintStream;importjava.util.ArrayList;importjava.util.Random;importjava.util.Scanner;importjavax.swing.JButton;importjavax.swing.JFileChooser;importjavax.swing.JFrame;importjavax.swing.JLabel
3、;importjavax.swing.JOptionPane;importjavax.swing.JPasswordField;importjavax.swing.JTextField;publicclassEncryPL{privateJFramejfra_Encry;privateJLabeljlab_Sourc;privateJLabeljlab_Dest;privateJLabeljlab_Key;privateJLabeljlab_Err;privateJTextFieldjtext_Sourc;privateJTextFieldjtext_Dest
4、;privateJPasswordFieldjtext_Key;privateJButtonjbtn_Encrypt;privateJButtonjbtn_UnEncrypt;privateJButtonjbtn_Encrypt_Dot;privateJButtonjbtn_UnEncrypt_Dot;privateStringstr_AllCodeFile="AllCodeFile.txt";privateStringstr_SourceFile;privateStringstr_DestFile;privateStringstr_KeyText;priva
5、teint[][][]AllCode=newint[256][24][4];privateint[]int_Key=newint[32];privatebyte[]byte_Key=newbyte[4];privateint[]int_KeyStick=newint[32];publicstaticvoidmain(String[]args){EncryPLEPL=newEncryPL();EPL.Init_Encry();}privatevoidInit_Encry(){this.jfra_Encry=newJFrame();this.jfra_Encry.
6、setTitle("排列码加解密");this.jfra_Encry.setSize(500,400);Dimensionscreensize=Toolkit.getDefaultToolkit().getScreenSize();this.jfra_Encry.setLocation((screensize.width-this.jfra_Encry.getWidth())/2,(screensize.height-this.jfra_Encry.getHeight())/2);this.jfra_Encry.setDefaultCloseOperation
7、(3);this.jfra_Encry.setResizable(false);this.jfra_Encry.setLayout(null);this.jfra_Encry.setVisible(true);this.jlab_Sourc=newJLabel();this.jlab_Sourc.setText("源文件:");this.jlab_Dest=newJLabel();this.jlab_Dest.setText("终文件:");this.jlab_Key=newJLabel();this.jlab_Key.setText("密钥:");this.
8、jlab_Err=newJLabel(
此文档下载收益归作者所有