Skip to content

Commit

Permalink
RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
kaifer authored and root committed Jan 5, 2023
1 parent 98e2746 commit 14481a7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ JAVA 1.8버전 사용자들을 위한 세션키 발급 및 개인정보 암복

예시)
```
<version>0.0.9</version>
<version>0.0.10</version>
```

pom.xml 을 사용하시면 아래와 같이 추가해주세요.
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
rootProject.name = 'toss-cert-java-sdk'

4 changes: 2 additions & 2 deletions src/main/java/im/toss/cert/sdk/TossCertSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/im/toss/cert/sdk/TossCertSessionGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down

0 comments on commit 14481a7

Please sign in to comment.