Commit 12497fff by unknown

debug the util class

parent 7191d245
......@@ -363,6 +363,11 @@ public class DateUtil {
public static void main(String[] args) throws ParseException {
DateUtil.getDates("2014-05-26", "2014-06-26", "1");
System.out.println(DateUtil.addDays(new Date(), 1));
long day = getDistinceDay(parseDate("2017-10-23"), new Date());
System.out.println("day---->"+day);
}
// 获取相隔天数
......
......@@ -291,7 +291,8 @@ public class EncryptUtil {
}
public static void main(String[] args) throws Exception{
String src = "3e6f1a1c511148c492d7abc694f6a9";
// String src = "3e6f1a1c511148c492d7abc694f6a9";
String src = "1234567.com";
byte[] key = {67, 116, 114, 105, 112, 46, 73, 87, 97, 110, 45, 71, 111, 108, 102, 64, 68, 83, 84, 53, 56, 53, 48, 57};
byte[] result = EncryptUtil.encryptBy3Des(key, src.getBytes());
String base64str = new String(Base64.encodeBase64(result));
......@@ -306,6 +307,16 @@ public class EncryptUtil {
// PBKDF2
System.out.println(getMD5Str("12345"));
System.out.println(authenticate(getMD5Str("12345"), toByte("641FD40ED3EBFA29C66A329C937F749538A64F0A"), toByte("7D7B435E0A7DC4EA")));
byte[] bb = Base64.decodeBase64("h3xP2d5oUbUh6xmwLKXa4Q==");
byte[] plain1 = null;
try {
plain1 = EncryptUtil.decryptBy3Des(key, bb);
System.out.println("plain1:"+new String(plain1));
} catch (Exception e) {
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment