2 つのユーティリティ クラス
1. MD5暗号化ウィジェット
public class EncryptUtils {
public static String md5(String state){
return DigestUtils.md5Hex(state);
}
}
2. 4桁のランダムな認証コードを生成します。
public class VerifyCodeUtils {
public static String getRandomVerifyCode(){
return String.format("%04d", System.currentTimeMillis() % 10000L);
}
}