Java¼ÓÃܽâÃÜ
Eryptogram.java Îļþ£º
package com.cube.limail.util;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
/**
* ¼ÓÃܽâÃÜÀà
* @author Ò¶Ê÷Éî
* @version 1.00 2008Äê01ÔÂ03ÈÕ
*/
public class Eryptogram
{
private static String Algorithm ="DES";
private String key="CB7A92E3D3491964";
//¶¨Òå ¼ÓÃÜËã·¨,¿ÉÓà DES,DESede,Blowfish
static boolean debug = false ;
/**
* ¹¹Ôì×Ó×¢½â.
*/
public Eryptogram ()
{
} /**
* Éú³ÉÃÜÔ¿
* @return byte[] ·µ»ØÉú³ÉµÄÃÜÔ¿
* @throws exception ÈÓ³öÒì³£.
*/
public static byte [] getSecretKey () throws Exception
{
KeyGenerator keygen = KeyGenerator.getInstance (Algorithm );
SecretKey deskey = keygen.generateKey ();
System.out.println ("Éú³ÉÃÜÔ¿:"+bytesToHexString (deskey.getEncoded ()));
if (debug ) System.out.println ("Éú³ÉÃÜÔ¿:"+bytesToHexString (deskey.getEncoded ()));
return deskey.getEncoded ();
} /**
* ½«Ö¸¶¨µÄÊý¾Ý¸ù¾ÝÌṩµÄÃÜÔ¿½øÐмÓÃÜ
* @param input ÐèÒª¼ÓÃܵÄÊý¾Ý
* @param key ÃÜÔ¿
* @return byte[]
Ïà¹ØÎĵµ£º
ÔںܶàÊý¾Ý¿âÖУ¬“ÐÔ±ð”ÕâÒ»×Ö¶ÎÊÇÓÃÓÚintÀàÐÍ´æ´¢µÄ£¬ÈçÓÃ0±íʾ“Å®”£¬1±íʾ“ÄД¡£Ê¹ÓÃResultSet¶ÔÏórs½ÓÊÕ²éѯÊý¾Ý£¬ÔÚ»ñÈ¡Êý¾Ýʱʱ£¬rs.getString()·½·¨ºÍrs.getInt()·½·¨»ñÈ¡µÄÈÔÈ»ÊÇ0(Çø±ðÔÚÓÚStringÀàÐÍ»òÊÇintÀàÐÍ)¡£¶øÔÚʵ¼ÊÓ¦ÓÃʱ£¬ÎÒÃǸüÏ£Íû»ñµÃµÄÊý¾ÝÊÇÖ±¹ÛµØÏÔʾ“ÄÐ ......
JAVA EXCEL API¼ò½é
Java ExcelÊÇÒ»¿ª·ÅÔ´ÂëÏîÄ¿£¬Í¨¹ýËüJava¿ª·¢ÈËÔ±¿ÉÒÔ¶ÁÈ¡ExcelÎļþµÄÄÚÈÝ¡¢´´½¨ÐµÄExcelÎļþ¡¢¸üÐÂÒѾ´æÔÚµÄExcelÎļþ¡£Ê¹ÓøÃAPI·ÇWindows²Ù×÷ϵͳҲ¿ÉÒÔͨ¹ý´¿JavaÓ¦ÓÃÀ´´¦ÀíExcelÊý¾Ý±í¡£ÒòΪÊÇʹÓÃJava±àдµÄ£¬ËùÒÔÎÒÃÇÔÚWebÓ¦ÓÃÖпÉÒÔͨ¹ýJSP¡¢ServletÀ´µ÷ÓÃAPIʵÏÖ¶ÔExcelÊý¾Ý±íµÄ·ÃÎÊ¡£
ÏÖÔ ......
java¿ª·¢ÈËÔ±¾Ñé×ܽá-Î人±±´óÇàÄñ
¡¡¡¡·Á¢Ïî
¡¡¡¡Ò»¡¢ÐèÇóµÄÊÕ¼¯£¬UCµÄ±àдËäÈ»²»ÊÇ¿ª·¢ÈËÔ±µÄ¹¤×÷£¬µ«×îÖÕÐèÒª¿ª·¢ÈËÔ±ÔÚ²úÆ·ÖÐʵÏÖ¡£ËùÒÔ¿ª·¢²»ºÏÀíµÄÉè¼ÆÖÁÉÙÀË·ÑÁËÄãµÄʱ¼ä£¬¿ª·¢¼¼ÊõÎÞ·¨ÊµÏÖµÄÉè¼Æ´øÀ´×î´óµÄÍ´¿à£ºÊ§°Ü¡£ËùÒÔ£¬¿ª·¢ÈËÔ±ÒªÖØÊÓÐèÇóÒÔ¼°UCµÄÆÀÉó£¬Ìá³ö×Ô¼ºÄܹ»Ïëµ½µÄËùÓÐÒìÒé¡£
¡¡¡¡¶þ¡¢Ò»¶ ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ ......