MD5 密码加密算法
1 public static String md(String md, String pass) { 2 MessageDigest m; 3 String passok = ""; 4 try { 5 m = MessageDigest.getInstance(md); 6 m.update(pass.getBytes()); 7 for (byte b : m.digest()) { 8 passok += String.format("%x", b); 9 } 10 } catch (NoSuchAlgorithmException e) { 11 e.printStackTrace(); 12 } 13 return passok; 14 }
系统等待2S
1 public static void stay() { 2 try { 3 Thread.sleep(2000); 4 } catch (InterruptedException e1) { 5 e1.printStackTrace(); 6 } 7 }
时间: 2024-10-14 03:01:54