JavaÃÜÂë¼ÓÃÜ
Java´úÂë
package com.sunnylocus.util;
import java.security.MessageDigest;
/**
* ¶ÔÃÜÂë½øÐмÓÃܺÍÑéÖ¤µÄÀà
*/
public class CipherUtil{
//Ê®Áù½øÖÆÏÂÊý×Öµ½×Ö·ûµÄÓ³ÉäÊý×é
private final static String[] hexDigits = {"0", "1", "2", "3", "4",
"5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
/** * °ÑinputString¼ÓÃÜ */
public static String generatePassword(String inputString){
return encodeByMD5(inputString);
}
/**
* ÑéÖ¤ÊäÈëµÄÃÜÂëÊÇ·ñÕýÈ·
* @param password ¼ÓÃܺóµÄÃÜÂë
* @param inputString ÊäÈëµÄ×Ö·û´®
* @return ÑéÖ¤½á¹û£¬TRUE:ÕýÈ· FALSE:´íÎó
*/
public static boolean validatePassword(String password, String inputString){
if(password.equals(encodeByMD5(inputString))){
return true;
Ïà¹ØÎĵµ£º
WindowsϵÄMemcache°²×°£º
1. ÏÂÔØmemcacheµÄwindowsÎȶ¨°æ£¬½âѹ·Åij¸öÅÌÏÂÃæ£¬±ÈÈçÔÚc:\memcached
2. ÔÚÖÕ¶Ë£¨Ò²¼´cmdÃüÁî½çÃæ£©ÏÂÊäÈë ‘c:\memcached\memcached.exe -d install’ °²×°
3. ÔÙÊäÈ룺 ‘c:\memcached\memcached.exe -d start’ Æô¶¯¡£NOTE: ÒÔºómemcached½«×÷ΪwindowsµÄÒ»¸ö· ......
1.ÈçºÎ»ñµÃÊý×éµÄ³¤¶È£¿
Êý×éÃû.length
2.·ÃÎÊÐÞÊηû“public/private/protected/ȱʡµÄÐÞÊηû”µÄʹÓÃÀà?
public : ¹«¹²,¾ù¿É·ÃÎÊ
private: ˽ÓеÄ,ͬһ¸öjavaÀàÖпÉÒÔ·ÃÎÊ.×ÓÀ಻ÄÜ·ÃÎÊ.
protected: ͬһ¸ö°üÖеÄÀà¶¼¿É·ÃÎÊ.×ÓÀà¿ÉÒÔ·ÃÎÊ.
ȱʡ,friendly :µ±Ç°Àà,ͬһ¸ö°ü,¶¼¿ÉÒÔ·ÃÎÊ.
×÷ÓÃÓò µ± ......
Ãô½Ý¿ª·¢µÄÀíÄîÒѾÁ÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά »¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸öÏ ......
Ò»¡¢±íµ¥Ìá½»ÖÐÎÄÊý¾Ý³öÏÖÂÒÂ룺
£¨1£© post Ìá½»·½Ê½ÂÒÂë½â¾ö·½·¨£º
ʹÓùýÂËÆ÷¹ýÂËÇëÇó£¬ÔÚ¹ýÂËÆ÷ÖÐÌí¼Ó request.setCharacterEncoding("UTF-8");
£¨2£©getÌá½»·½Ê½ÂÒÂë½â¾ö·½·¨£º
ÔÚto ......