/**
* 获取单例
* @return
*/
public static AESUtils getInstance(){
if(aesUtils == null){
// 当需要创建的时候在加锁
synchronized(AESUtils.class) {
if (aesUtils == null) {
aesUtils = new AESUtils();
init();
}
}
}
return aesUtils;
}
/**
* 获取单例
* @return
*/
public static AESUtils getInstance(){
if(aesUtils == null){
// 当需要创建的时候在加锁
synchronized(AESUtils.class) {
if (aesUtils == null) {
aesUtils = new AESUtils();
init();
}
}
}
return aesUtils;
}