就是按照一定的编码规则,将password的值加密...

解决方案 »

  1.   

    用MD5加密吧!
    几种加密的方法,仅供参考:)
    public static byte[] encrypt(byte[] source, String algorithm) throws NoSuchAlgorithmException {
           MessageDigest md = MessageDigest.getInstance(algorithm);
           md.reset();
           md.update(source);
           return md.digest();
       }
       public static String encrypt(String source, String algorithm) throws NoSuchAlgorithmException {
           byte[] resByteArray = encrypt(source.getBytes(), algorithm);
           return toHexString(resByteArray);
       }   public static String encryptMD5(String source) {
           if (source == null) {
               source = "";
           }       String result = "";
           try {
               result = encrypt(source, "MD5");
           }
           catch(NoSuchAlgorithmException ex) {
               ex.printStackTrace();
           }
           return result;
       }