SHA 1ÕªÒªËã·¨Ô´Âë(java°æ)
public class SHA1 {
private final int[] abcde = {
0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0
};
// ÕªÒªÊý¾Ý´æ´¢Êý×é
private int[] digestInt = new int[5];
// ¼ÆËã¹ý³ÌÖеÄÁÙʱÊý¾Ý´æ´¢Êý×é
private int[] tmpData = new int[80];
// ¼ÆËãsha-1ÕªÒª
private int process_input_bytes(byte[] bytedata) {
// ³õÊÔ»¯³£Á¿
System.arraycopy(abcde, 0, digestInt, 0, abcde.length);
// ¸ñʽ»¯ÊäÈë×Ö½ÚÊý×飬²¹10¼°³¤¶ÈÊý¾Ý
byte[] newbyte = byteArrayFormatData(bytedata);
// »ñÈ¡Êý¾ÝÕªÒª¼ÆËãµÄÊý¾Ýµ¥Ôª¸öÊý
int MCount = newbyte.length / 64;
// Ñ»·¶Ôÿ¸öÊý¾Ýµ¥Ôª½øÐÐÕªÒª¼ÆËã
for (int pos = 0; pos < MCount; pos++) {
// ½«Ã¿¸öµ¥ÔªµÄÊý¾Ýת»»³É16¸öÕûÐÍÊý¾Ý£¬²¢±£´æµ½tmpDataµÄÇ°16¸öÊý×éÔªËØÖÐ
for (int j = 0; j < 16; j++) {
tmpData[j] = byteArrayToInt(newbyte, (pos * 64) + (j * 4));
}
// ÕªÒª¼ÆË㺯Êý
encrypt();
}
return 20;
}
// ¸ñʽ»¯ÊäÈë×Ö½
Ïà¹ØÎĵµ£º
JAVA_HOME:
C:\Java\jdk1.6.0_17
Path:
%JAVA_HOME%\bin
ClassPath:
.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar
ÎÒÃÇÐèÒªÉèÖÃÈý¸ö»·¾³±äÁ¿£ºJAVA_HOME¡¢PATH ºÍ CLASSPATH¡£
JAVA_HOME£º¸Ã»·¾³±äÁ¿µÄÖµ¾ÍÊÇ Java ËùÔÚµÄĿ¼£¬Ò»Ð© Java °æµÄÈí¼þºÍÒ»
Щ Java µÄ¹¤¾ßÐèÒªÓõ½¸Ã±äÁ¿£¬ÉèÖà PATH ºÍ CLASSP ......
Java³£ÓÃ×Ö·û¼¯±àÂëÏê½â
Web¿ª·¢µÄʱºò¾³£»áÓöµ½Ò»Ð©×Ö·û±àÂëµÄ´íÎó£¬ÈçÒ³ÃæÂÒÂëµÈÎÊÌ⣬ËùÒÔÓбØÒªÐè¶Ô×Ö·û±àÂëÓÐËùÁ˽⣬ÒÔÏÂÊÇRickiÊÕ¼¯µÄһЩ×ÊÁÏ£¨¿ÉÄܲ»ÊǺÜÈ«£¬µ«Ï£Íû¶ÔÄãÓÐËù°ïÖú£©
Java±ê×¼×Ö·û¼¯£ºËùνJava±ê×¼×Ö·û¼¯£¬¾ÍÊÇJavaƽ̨֧³ÖµÄ×Ö·û ......
Java6 ½Å±¾ÒýÇæ(ÓÃJavaµ÷ÓÃJS½Å±¾)µ÷ÓÃjs
import java.io.FileNotFoundException;
import java.io.FileReader;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
&n ......
Java¿ì½Ý¼üÖÆ×÷
ÓùýVBµÄÖªµÀ°´ÏÂF5ÊÇÔËÐд°Ì壬ÓùýPhotoshopµÄÖªµÀ°´ÏÂTabÊÇÒþ²ØËùÓÐÃæ°å
£¬ÄãµÄJava³ÌÐòÒ²ÏëÓÐÕâ¸ö¹¦ÄÜô£¿ÄÇôϣÍûÕâƪÎÄÕ¶ÔÄúÓÐËù°ïÖú¡£
×Ӳ˵¥ÀàJMenuItemÓÐÒ»¸ö·½·¨²»ÖªµÀÄã×¢Òâ¹ýûÓÐ:setAccelerator¡£
´ò¿ª°ïÖúÎļþ¶ÔÕâ¸ö·½·¨µÄÃèÊöÊÇ£º ÉèÖÃ×éºÏ¼ü£¬ËüÄÜÖ±½Óµ÷Óò˵¥ÏîµÄ²Ù×÷
ÕìÌýÆ÷¶ø²»±ØÏ ......
ÔÌùÄÚÈÝÇë¼û: http://topic.csdn.net/u/20100116/17/6a204504-9e70-435f-be55-f0630ed12fdf.html?seed=942806558&r=62778073#r_62778073
Çë´óÅ£Ö¸Õý.
²úÆ·Àà:
package selfimpr.producerCustomer;
/**
* ²úÆ·
* @author selfimpr
* @blog http://blog.csdn.net/lgg201
* @email lgg860911@yahoo.com.cn
......