Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¸öJAVAÎļþ¼ÓÃÜ´úÂë

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;
/**
ÎļþÃû£ºFileEncrypter.java
JDK£º1.40ÒÔÉÏ
˵Ã÷£ºÎļþ¼ÓÃÜ
¼ÓÃÜ·½·¨£ºÈýÖØDES¼ÓÃÜ
¼ÓÃܹý³Ì£º¶ÔÑ¡ÖеÄÎļþ¼ÓÃܺóÔÚͬÎļþ¼ÐÏÂÉú³ÉÒ»¸öÔö¼ÓÁË".tdes"
À©Õ¹ÃûµÄ¼ÓÃÜÎļþ
½âÃܹý³Ì£º¶ÔÑ¡ÖеļÓÃÜÎļþ£¨±ØÐëÓÐ".tdes"À©Õ¹Ãû£©½øÐнâÃÜ
*/
public class FileEncrypter extends JFrame{
public static final int WIDTH = 550;
public static final int HEIGHT = 200;
public static void main(String args[]) {
FileEncrypter fe = new FileEncrypter();
fe.show();
}
FileEncrypter(){
this.setSize(WIDTH,HEIGHT);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setResizable(false);
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screenSize = tk.getScreenSize();
this.setLocation((screenSize.width - WIDTH)/2,
(screenSize.height - HEIGHT)/2);
this.setTitle("Îļþ¼ÓÃÜÆ÷(TriDES)");
Container c = this.getContentPane();
c.setLayout( new FlowLayout());
final FilePanel fp = new FilePanel("ÎļþÑ¡Ôñ");
c.add(fp);
final KeyPanel pp = new KeyPanel("ÃÜÂë");
c.add(pp);
JButton jbE = new JButton("¼ÓÃÜ");
c.add(jbE);
jbE.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
File file = new File(fp.getFileName());
if (file.exists())
encrypt(file.getAbsoluteFile(),pp.getKey());
else
JOptionPane.showMessageDialog(
null,"ÇëÑ¡ÔñÎļþ£¡","Ìáʾ",JOptionPane.OK_OPTION);
}
});
JButton jbD = new JButton("½âÃÜ");
c.add(jbD);
jbD.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
File file = new File(fp.getFileName());
if (file.exists())
decrypt(file.getAbsoluteFile(),pp.getKey());
else
JOptionPane.showMessageDialog(
null,"ÇëÑ¡ÔñÎļþ£¡","Ìáʾ",JOptionPane.OK_OPTION);
}
});
}
/**
¼ÓÃܺ¯Êý
ÊäÈ룺
Òª¼ÓÃܵÄÎļþ£¬ÃÜÂ루ÓÉ0-F×é³É£¬¹²48¸ö×Ö·û£¬±íʾ3¸ö8λµÄÃÜÂ룩È磺
AD67EA


Ïà¹ØÎĵµ£º

java ½âÎö¹«Ê½Àà

package test;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * ʵÏÖ¶Ô×Ö·û´®±í´ïʽ½øÐмòµ¥µÄ°üÀ¨º¯ÊýµÄÔËËã¡£
 *
 * @auth ......

JAVAºÍPHP»ñÈ¡mysql×îºó²åÈëµÄ×ÔÔöidÖµ

phpºÍjavaͨÓÃsqlÓï¾ä·¨
SELECT max(id) from table
¸Ã·½·¨ÔÚ¶àÏ̵߳ÈÇé¿öÏ¿ÉÄÜ»áÔì³É²»ÕýÈ·¡£
javaÈýÖÖ·½·¨
1¡¢¸ù¾ÝpsµÄgetGeneratedKeys
PreparedStatement ps = conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS); //ºìÉ«Êǹؼü
ps.executeUpdate(); //Ö´Ðкó
ResultSet rs = ps.getGeneratedKeys ......

java¸÷ÖÖÅÅÐò·½·¨

package org.rut.util.algorithm.support;
 
import org.rut.util.algorithm.SortUtil;
/**
 * @author treeroot
 * @since 2006-2-2
 * @version 1.0
 */
public class InsertSort implements SortUtil.Sort{
 
    /* (non-Javadoc)
     * ......

java ×¢ÊÍ : annotations ÔªÊý¾Ý

annotations : ×¢ÊÍ
ºÃ´¦
1.Îĵµ±àÖÆ
2.±àÒëÆ÷¼ì²é
3.´úÂë·ÖÎö
JSR 175 ÊDZà³ÌÓïÑÔµÄÔªÊý¾Ý¹¤¾ß,Ϊ½«ÔªÊý¾ÝºÏ²¢µ½ºËÐÄjavaÓïÑÔÖÐÌṩÕýʽÀíÓɺÍ˵Ã÷
»ù±¾ÖªÊ¶:
×¢ÊͲÉÓÃ"@"±ê¼ÇÐÎʽ,ºóÃæÊÇ×¢ÊÍÃû³Æ,È»ºóÔÚÐèÒªÊý¾Ýʱ,ͨ¹ýname=value¶ÔÏò×¢ÊÍÌṩÊý¾Ý
×¢Ê͵ÄÈý¸ö»ù±¾ÖÖÀà:
    ±ê¼Ç×¢ÊÍ ......

Java·¶ÐÍ

     ´Ójdk1.5¿ªÊ¼£¬JavaÖпªÊ¼Ö§³Ö·¶ÐÍÁË¡£·¶ÐÍÊÇÒ»¸öºÜÓÐÓõıà³Ì¹¤¾ß£¬¸øÎÒÃÇ´øÀ´Á˼«´óµÄÁé»îÐÔ¡£ÔÚ¿´ÁË¡¶javaºËÐıà³Ì¡·Ö®ºó£¬ÎÒСÓÐÊÕ»ñ£¬Ð´³öÀ´Óë´ó¼Ò·ÖÏí¡£ 
     Ëùν·¶ÐÍ£¬Îҵĸоõ¾ÍÊÇ£¬²»Óÿ¼ÂǶÔÏóµÄ¾ßÌåÀàÐÍ£¬¾Í¿ÉÒÔ¶Ô¶ÔÏó½øÐÐÒ»¶¨µÄ²Ù×÷£¬¶ÔÈκζÔÏó¶¼Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ