diff --git a/README.md b/README.md
index 1235caa..6485b96 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ JAVA 1.8버전 사용자들을 위한 세션키 발급 및 개인정보 암복
예시)
```
-0.0.9
+0.0.10
```
pom.xml 을 사용하시면 아래와 같이 추가해주세요.
diff --git a/build.gradle b/build.gradle
index feccc74..7e46b0d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,10 +3,12 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
+ id 'org.owasp.dependencycheck' version '6.2.1'
+ id 'org.sonarqube' version '3.3'
}
group 'com.github.toss'
-version '0.0.9'
+version '0.0.10'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
@@ -25,6 +27,8 @@ repositories {
dependencies {
implementation 'commons-codec:commons-codec:1.15'
+ implementation 'org.owasp:dependency-check-gradle:6.2.1'
+ implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
diff --git a/settings.gradle b/settings.gradle
index 934e94e..2cb5e8d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1 @@
rootProject.name = 'toss-cert-java-sdk'
-
diff --git a/src/main/java/im/toss/cert/sdk/TossCertSession.java b/src/main/java/im/toss/cert/sdk/TossCertSession.java
index 06c6268..03405b3 100644
--- a/src/main/java/im/toss/cert/sdk/TossCertSession.java
+++ b/src/main/java/im/toss/cert/sdk/TossCertSession.java
@@ -43,7 +43,7 @@ public String encrypt(String plainText) {
String hash = calculateHash(plainText);
return addMeta(StringUtils.join(separator, new String[]{encrypted, hash}));
} catch (Exception e) {
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e);
}
}
@@ -63,7 +63,7 @@ public String decrypt(String encryptedText) {
verify(plainText, items);
return plainText;
} catch (Exception e) {
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e);
}
}
diff --git a/src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java b/src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java
index 616194b..74ec1f9 100644
--- a/src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java
+++ b/src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java
@@ -8,7 +8,7 @@
import java.util.UUID;
public class TossCertSessionGenerator {
- private final static String version = "v1_0.0.9";
+ private final static String version = "v1_0.0.10";
private final static String publicKey = "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAoVdxG0Qi9pip46Jw9ImSlPVD8+L2mM47ey6EZna7D7utgNdh8Tzkjrm1Yl4h6kPJrhdWvMIJGS51+6dh041IXcJEoUquNblUEqAUXBYwQM8PdfnS12SjlvZrP4q6whBE7IV1SEIBJP0gSK5/8Iu+uld2ctJiU4p8uswL2bCPGWdvVPltxAg6hfAG/ImRUKPRewQsFhkFvqIDCpO6aeaR10q6wwENZltlJeeRnl02VWSneRmPqqypqCxz0Y+yWCYtsA+ngfZmwRMaFkXcWjaWnvSqqV33OAsrQkvuBHWoEEkvQ0P08+h9Fy2+FhY9TeuukQ2CVFz5YyOhp25QtWyQI+IaDKk+hLxJ1APR0c3tmV0ANEIjO6HhJIdu2KQKtgFppvqSrZp2OKtI8EZgVbWuho50xvlaPGzWoMi9HSCb+8ARamlOpesxHH3O0cTRUnft2Zk1FHQb2Pidb2z5onMEnzP2xpTqAIVQyb6nMac9tof5NFxwR/c4pmci+1n8GFJIFN18j2XGad1mNyio/R8LabqnzNwJC6VPnZJz5/pDUIk9yKNOY0KJe64SRiL0a4SNMohtyj6QlA/3SGxaEXb8UHpophv4G9wN1CgfyUamsRqp8zo5qDxBvlaIlfkqJvYPkltj7/23FHDjPi8q8UkSiAeu7IV5FTfB5KsiN8+sGSMCAwEAAQ==";
private final RSACipher rsaCipher;
@@ -21,7 +21,7 @@ public TossCertSessionGenerator(String publicKeyString) {
try {
this.rsaCipher = new RSACipher(publicKeyString);
} catch (Exception e) {
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e);
}
}
@@ -54,7 +54,7 @@ private TossCertSession generate(AESAlgorithm algorithm, int keyLength, int ivLe
String encryptedSessionKey = buildEncryptSessionKeyPart(algorithm, secretKey, iv);
return new TossCertSession(version, id, algorithm, secretKey, iv, encryptedSessionKey);
} catch (Exception e) {
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e);
}
}
@@ -67,7 +67,7 @@ public TossCertSession deserialize(String serializedSessionKey) {
String encryptedSessionKey = buildEncryptSessionKeyPart(algorithm, secretKey, iv);
return new TossCertSession(fields[0], fields[1], algorithm, secretKey, iv, encryptedSessionKey);
} catch (Exception e) {
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e);
}
}