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

RabbitÁ÷ÃÜÂëµÄJavaʵÏÖ

1. RabbitÁ÷ÃÜÂ루Rabbit Stream Cipher£©¼ò½é
      RabbitÁ÷ÃÜÂëÊÇÓÉCryptico¹«Ë¾£¨http://www.cryptico.com£©Éè¼ÆµÄ£¬ÃÜÔ¿³¤¶È128룬
×î´ó¼ÓÃÜÏûÏ¢³¤¶ÈΪ264 Bytes£¬¼´16 TB£¬ÈôÏûÏ¢³¬¹ý¸Ã³¤¶È£¬ÔòÐèÒª¸ü»»ÃÜÔ¿¶ÔʣϵÄÏûÏ¢½øÐд¦Àí¡£ËüÊÇÄ¿Ç°°²È«ÐԽϸߣ¬¼Ó/½âÃÜËٶȱȽϸßЧµÄÁ÷ÃÜÂëÖ®Ò»£¬ÔÚ¸÷ÖÖ´¦ÀíÆ÷ƽ̨É϶¼Óв»·²µÄ±íÏÖ¡£
      Ïêϸ×ÊÁÏ£º
            1.http://www.cryptico.com/Files/filer/rabbit_fse.pdf
            2.http://www.ietf.org/rfc/rfc4503.txt
      ±¾ÎÄʵÏÖÁ˸ÃËã·¨µÄjavaÓïÑÔʵÏÖ£¬½ö¹©²Î¿¼¡£
2.  ʵÏÖÔ´Âë
  /**
* The Java Implementation of Rabbit Stream Cipher
* @author cnbragon
* @email cnbragon_dot_163_dot_com
* @date 2009/09/25
* @note Not implemented IV scheme
* @Reference:
* 1.http://www.cryptico.com/Files/filer/rabbit_fse.pdf
* 2.http://www.ietf.org/rfc/rfc4503.txt
*/
class Rabbit
{
private int[] x = new int[8];
private int[] c = new int[8];
private int carry;
public void Rabbit()
{
for(int i = 0; i < 8; i++)
{
x[i] = c[i] = 0;
}
carry = 0;
}
private int g_func(int x)
{
int a = x & 0xffff;
int b = x >>> 16;

int h =( ( ( ( a * a ) >>> 17 ) + ( a * b ) ) >>> 15 ) + b * b;
int l = x * x;

return h ^ l;
}
/**
* @declaration ±È½ÏÁ½¸öÓзûºÅÕûÊýµÄÊ®Áù½øÖƵĴóС£¬¼´×÷ΪÎÞ·ûºÅÕûÊý½øÐбȽÏ
* @param x
* @param y
* @return Èô(unsigned x) < (unsigned y)£¬Ôò·µ»Ø1£¬·ñÔò·µ»Ø0
*/
private int compare(int x, int y)
{
long a = x;
long b = y;
a &= 0x00000000ffffffffl;
b &= 0x00000000ffffffffl;

return (a < b) ? 1 : 0;
}
private int rotL(int x, int y)


Ïà¹ØÎĵµ£º

JavaÁ¬½ÓDB2Ïà¹Ø

1. ¹ØÓÚConnection Pool
JDBC±¾Éí²»ÌṩÁ¬½Ó³Ø¼¼Êõ£¬ÐèÒªµÚÈý·½¿âµÄÖ§³Ö¡£
ÔÚÐèҪƵ·±»ñµÃÁ¬½ÓµÄApplicationÖÐ×îºÃÓÃConnection Pool£¬ÈçWeb ApplicationÖÐ
¶ÔÓÚÒ»°ãµÄJava ApplicationÔò¿ÉÒÔÖ±½ÓÓÃJDBCÁ¬½ÓÊý¾Ý¿â¡£
 
2. Java ApplicationÖÐÁ¬½ÓDB2
    °²×°DB2 Personal Edition V9Ö®ºó£¬ÔÚÆäÖ ......

[תÔØ]javaÖеÄ×¢Ê͹淶

 JAVA×¢ÊÍ·½·¨¼°¸ñʽ
1¡¢µ¥ÐÐ(single-line)--¶Ì×¢ÊÍ£º//……   
µ¥¶ÀÐÐ×¢ÊÍ£ºÔÚ´úÂëÖе¥ÆðÒ»ÐÐ×¢ÊÍ£¬ ×¢ÊÍÇ°×îºÃÓÐÒ»ÐпÕÐУ¬²¢ÓëÆäºóµÄ´úÂë¾ßÓÐÒ»ÑùµÄËõ½ø²ã¼¶¡£Èç¹ûµ¥ÐÐÎÞ·¨Íê³É£¬ÔòÓ¦²ÉÓÿé×¢ÊÍ¡£
×¢Ê͸ñʽ£º/* ×¢ÊÍÄÚÈÝ */
ÐÐÍ·×¢ÊÍ£ºÔÚ´úÂëÐеĿªÍ·½øÐÐ×¢ÊÍ¡£Ö÷ҪΪÁËʹ¸ÃÐд ......

Java ¼¼ÊõÊÇʲô£¿

Java ¼¼ÊõÊÇʲô£¿
Java ¼¼Êõ¼ÈÊÇÒ»Öָ߼¶µÄÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬Ò²ÊÇÒ»¸öƽ̨¡£Java ¼¼Êõ»ùÓÚ Java ÐéÄâ»ú£¨Java virtual machine£¬JVM£©µÄ¸ÅÄî —— ÕâÊÇÓïÑÔÓëµ×²ãÈí¼þºÍÓ²¼þÖ®¼äµÄÒ»ÖÖת»»Æ÷¡£Java ÓïÑÔµÄËùÓÐʵÏÖ¶¼±ØÐëʵÏÖ JVM£¬´Ó¶øʹ Java ³ÌÐò¿ÉÒÔÔÚÓÐ JVM µÄÈκÎϵͳÉÏÔËÐС£
Java ±à³ÌÓïÑÔ£¨Java p ......

javaѧϰÍøÖ·

1.JavaѧϰÍøÕ¾:
JavaÖÐÎÄÊÀ½çÂÛ̳        http://www.chinajavaworld.com/index.jspa
JavaÊÀ¼ÍÍø              http://www.java2000.net/
Java ÖÐÎÄÕ¾            http://www.java-cn.com/
JavaѧϰÊÒ      ......

JavaÖÐHashMapʹÓÃ×Ô¶¨ÒåKeyÀà

×Ô¶¨ÒåµÄKeyÀàÐèÒªÖØÔØequals, hashCodeº¯Êý¡£¡£ 
package com.albert.test;
import java.util.Vector;
import java.util.HashMap;
/**
* @author tough_guy
*
*/
//¶ÔÓÚ×Ô¶¨ÒåµÄkey£¬ ÐèÒªÖØÔØhashCodeº¯ÊýºÍequalsº¯Êý
class IPSegment
{
long ip_s;
long ip_e;
int p;
IPSegment Reset(long f ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ