|
|
|
@ -1,5 +1,24 @@
|
|
|
|
|
package kr.xit.core.spring.config.custom.bouncy;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.StringReader;
|
|
|
|
|
import java.io.StringWriter;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.nio.file.Files;
|
|
|
|
|
import java.nio.file.Paths;
|
|
|
|
|
import java.security.InvalidParameterException;
|
|
|
|
|
import java.security.Key;
|
|
|
|
|
import java.security.KeyFactory;
|
|
|
|
|
import java.security.KeyPair;
|
|
|
|
|
import java.security.KeyPairGenerator;
|
|
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
|
|
|
import java.security.PrivateKey;
|
|
|
|
|
import java.security.PublicKey;
|
|
|
|
|
import java.security.spec.PKCS8EncodedKeySpec;
|
|
|
|
|
import java.security.spec.X509EncodedKeySpec;
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
import javax.crypto.Cipher;
|
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
|
import kr.xit.core.exception.BizRuntimeException;
|
|
|
|
|
import kr.xit.core.support.utils.DateUtils;
|
|
|
|
|
import kr.xit.core.support.utils.FileUtil;
|
|
|
|
@ -12,18 +31,6 @@ import org.bouncycastle.util.io.pem.PemObject;
|
|
|
|
|
import org.bouncycastle.util.io.pem.PemReader;
|
|
|
|
|
import xit.core.init.custom.bouncy.BouncyDecUtils;
|
|
|
|
|
|
|
|
|
|
import javax.crypto.Cipher;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.StringReader;
|
|
|
|
|
import java.io.StringWriter;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.nio.file.Files;
|
|
|
|
|
import java.nio.file.Paths;
|
|
|
|
|
import java.security.*;
|
|
|
|
|
import java.security.spec.PKCS8EncodedKeySpec;
|
|
|
|
|
import java.security.spec.X509EncodedKeySpec;
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <pre>
|
|
|
|
|
* description : DSA 파일 생성 / 암/복호화 Utils
|
|
|
|
@ -288,7 +295,7 @@ public class BouncyUtils {
|
|
|
|
|
//BouncyFileHelper.decryptionFile(key, path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long expiredDate = DateUtils.parseStringToLong("20991231135959", "yyyyMMddHHmmss");
|
|
|
|
|
long expiredDate = DateUtils.parseStringToLong("20991231135959", ApiConstants.FMT_DT_EMPTY_DLT);
|
|
|
|
|
String ip = "211.119.124.9";// IpMacUtils.getIpAddress();
|
|
|
|
|
//String ip = "211.119.124.73";// local ip
|
|
|
|
|
long curDate = DateUtils.getLongTodayAndNowTime();
|
|
|
|
|