/*
* EncryptUtils.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
package org.lambdasoft.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* @author TangLei <justinlei@gmail.com>
* @date 2008-11-28
*/
public class EncryptUtils {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
static final int S21 = 5;
static final int S22 = 9;
static final int S23 = 14;
static final int S24 = 20;
static final int S31 = 4;
static final int S32 = 11;
static final int S33 = 16;
static final int S34 = 23;
static final int S41 = 6;
static final int S42 = 10;
static final int S43 = 15;
static final int S44 = 21;
static final byte[] PADDING = { -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 };
private long[] state = new long[4]; // state (ABCD)
private long[] count = new long[2]; // number of bits, modulo 2^64 (lsb first)
private byte[] buffer = new byte[64]; // input buffer
public static String digestHexStr;
private static byte[] digest = new byte[16];
public
FileDialogÖ»ÄÜÑ¡ÔñÎļþ¶ø²»ÄÜÑ¡ÔñÎļþ¼Ð¡£JFileChooserÓÖÌ«´ó£¬²»Ì«ºÃ¿´£¬¹Äµ·Á˺ÃÒ»»áÖÕÓÚ½â¾öÁË¡£
¼Ç¼һϹؼü²¿·Ö´úÂ룬ÒÔ±¸²éÓá£
final JButton choose=new JButton("Ñ¡Ôñ´æ´¢ÎļþĿ¼");
final JTextField dir=new JTextField();
final JFileChooser chooser=new JFileChooser();
chooser.setFileSe ......
1.ÓÃnew String(request.getParameter("name").getBytes("ISO-8859-1"),"GBK") ·½Ê½½øÐÐתÂë
2.ÉèÖÃtomcat£ºÔÚtomcatµÄconfĿ¼ÏÂÕÒµ½server.xmlÎļþ£¬ÔÚConnector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
......