Skip to content

Commit 14481a7

Browse files
kaiferroot
authored and
root
committed
RELEASE
1 parent 98e2746 commit 14481a7

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ JAVA 1.8버전 사용자들을 위한 세션키 발급 및 개인정보 암복
66

77
예시)
88
```
9-
<version>0.0.9</version>
9+
<version>0.0.10</version>
1010
```
1111

1212
pom.xml 을 사용하시면 아래와 같이 추가해주세요.

build.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ plugins {
33
id 'java-library'
44
id 'maven-publish'
55
id 'com.github.johnrengelman.shadow' version '7.1.2'
6+
id 'org.owasp.dependencycheck' version '6.2.1'
7+
id 'org.sonarqube' version '3.3'
68
}
79

810
group 'com.github.toss'
9-
version '0.0.9'
11+
version '0.0.10'
1012

1113
sourceCompatibility = JavaVersion.VERSION_1_6
1214
targetCompatibility = JavaVersion.VERSION_1_6
@@ -25,6 +27,8 @@ repositories {
2527

2628
dependencies {
2729
implementation 'commons-codec:commons-codec:1.15'
30+
implementation 'org.owasp:dependency-check-gradle:6.2.1'
31+
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
2832
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
2933
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
3034

settings.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
rootProject.name = 'toss-cert-java-sdk'
2-

src/main/java/im/toss/cert/sdk/TossCertSession.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public String encrypt(String plainText) {
4343
String hash = calculateHash(plainText);
4444
return addMeta(StringUtils.join(separator, new String[]{encrypted, hash}));
4545
} catch (Exception e) {
46-
throw new RuntimeException(e.getCause());
46+
throw new RuntimeException(e);
4747
}
4848
}
4949

@@ -63,7 +63,7 @@ public String decrypt(String encryptedText) {
6363
verify(plainText, items);
6464
return plainText;
6565
} catch (Exception e) {
66-
throw new RuntimeException(e.getCause());
66+
throw new RuntimeException(e);
6767
}
6868
}
6969

src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import java.util.UUID;
99

1010
public class TossCertSessionGenerator {
11-
private final static String version = "v1_0.0.9";
11+
private final static String version = "v1_0.0.10";
1212
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==";
1313

1414
private final RSACipher rsaCipher;
@@ -21,7 +21,7 @@ public TossCertSessionGenerator(String publicKeyString) {
2121
try {
2222
this.rsaCipher = new RSACipher(publicKeyString);
2323
} catch (Exception e) {
24-
throw new RuntimeException(e.getCause());
24+
throw new RuntimeException(e);
2525
}
2626
}
2727

@@ -54,7 +54,7 @@ private TossCertSession generate(AESAlgorithm algorithm, int keyLength, int ivLe
5454
String encryptedSessionKey = buildEncryptSessionKeyPart(algorithm, secretKey, iv);
5555
return new TossCertSession(version, id, algorithm, secretKey, iv, encryptedSessionKey);
5656
} catch (Exception e) {
57-
throw new RuntimeException(e.getCause());
57+
throw new RuntimeException(e);
5858
}
5959
}
6060

@@ -67,7 +67,7 @@ public TossCertSession deserialize(String serializedSessionKey) {
6767
String encryptedSessionKey = buildEncryptSessionKeyPart(algorithm, secretKey, iv);
6868
return new TossCertSession(fields[0], fields[1], algorithm, secretKey, iv, encryptedSessionKey);
6969
} catch (Exception e) {
70-
throw new RuntimeException(e.getCause());
70+
throw new RuntimeException(e);
7171
}
7272
}
7373

0 commit comments

Comments
 (0)