Skip to content

Commit fd3b81c

Browse files
committed
updates used jdks in travis ci, updated tink to 1.2.2, updated gradle to 6.1.1
1 parent 996926c commit fd3b81c

7 files changed

+40
-25
lines changed

.travis.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
language: java
22
jdk:
3-
- oraclejdk8
3+
- openjdk8
44
- oraclejdk9
5+
- openjdk9
6+
- oraclejdk11
7+
- openjdk11
8+
- oraclejdk13
9+
- openjdk13
10+
#- oraclejdk14
11+
#- openjdk14
12+
#- oraclejdk15
13+
#- openjdk15
514
addons:
615
sonarcloud:
716
organization: "kmindi-github" # the key of the org you chose at step #3

build.gradle

+1-15
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,5 @@ repositories {
1717
dependencies {
1818
testCompile group: 'junit', name: 'junit', version: '4.12'
1919
// https://mvnrepository.com/artifact/com.google.crypto.tink/tink
20-
compile group: 'com.google.crypto.tink', name: 'tink', version: '1.1.1'
21-
}
22-
23-
tasks.withType(Test) { task ->
24-
jacoco {
25-
append = false
26-
}
27-
}
28-
29-
jacocoTestReport {
30-
reports {
31-
xml.enabled true
32-
csv.enabled false
33-
html.destination "${buildDir}/jacocoHtml"
34-
}
20+
compile group: 'com.google.crypto.tink', name: 'tink', version: '1.2.2'
3521
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

java_string_encryption_key_based_symmetric.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,25 @@ current_reviews: [
2424

2525
]
2626
# Indicates when this example was last updated/created. Reviews don't change this.
27-
last_updated: "2018-06-28"
27+
last_updated: "2020-02-16"
2828
tags: [Java, AES, GCM, AEAD]
2929
---
3030

3131
## Use cases
3232

3333
- String encryption
3434

35+
36+
## Java version
37+
38+
- openjdk8
39+
- oraclejdk9
40+
- openjdk9
41+
- oraclejdk11
42+
- openjdk11
43+
- oraclejdk13
44+
- openjdk13
45+
3546
## Example Code
3647

3748
```java

java_string_sign.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,25 @@ current_reviews: [
2424

2525
]
2626
# Indicates when this example was last updated/created. Reviews don't change this.
27-
last_updated: "2018-06-28"
27+
last_updated: "2020-02-16"
2828
tags: [Java]
2929
---
3030

3131
## Use cases
3232

3333
- Verifying if a string has been changed
3434

35+
36+
## Java version
37+
38+
- openjdk8
39+
- oraclejdk9
40+
- openjdk9
41+
- oraclejdk11
42+
- openjdk11
43+
- oraclejdk13
44+
- openjdk13
45+
3546
## Example Code
3647

3748
```java

src/main/java/com/cryptoexamples/java/ExampleSignatureInOneMethod.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package com.cryptoexamples.java;
22

3-
import com.google.crypto.tink.Config;
43
import com.google.crypto.tink.KeysetHandle;
54
import com.google.crypto.tink.PublicKeySign;
65
import com.google.crypto.tink.PublicKeyVerify;
6+
import com.google.crypto.tink.config.TinkConfig;
77
import com.google.crypto.tink.signature.PublicKeySignFactory;
88
import com.google.crypto.tink.signature.PublicKeyVerifyFactory;
9-
import com.google.crypto.tink.signature.SignatureConfig;
109
import com.google.crypto.tink.signature.SignatureKeyTemplates;
1110

1211
import java.nio.charset.StandardCharsets;
@@ -28,7 +27,7 @@ public static void main(String[] args) {
2827
String plainText = "Text that should be signed to prevent unknown tampering with its content.";
2928
try {
3029
// Initialize Tink configuration
31-
Config.register(SignatureConfig.TINK_1_1_0);
30+
TinkConfig.register();
3231

3332
// GENERATE NEW KEYPAIR
3433
KeysetHandle privateKeysetHandle = KeysetHandle.generateNew(SignatureKeyTemplates.ED25519);

src/main/java/com/cryptoexamples/java/ExampleStringEncryptionKeyBasedInOneMethod.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package com.cryptoexamples.java;
22

33
import com.google.crypto.tink.Aead;
4-
import com.google.crypto.tink.Config;
54
import com.google.crypto.tink.KeysetHandle;
6-
import com.google.crypto.tink.aead.AeadConfig;
75
import com.google.crypto.tink.aead.AeadFactory;
86
import com.google.crypto.tink.aead.AeadKeyTemplates;
7+
import com.google.crypto.tink.config.TinkConfig;
98

109
import java.nio.charset.StandardCharsets;
1110
import java.security.GeneralSecurityException;
@@ -29,7 +28,7 @@ public static void main(String[] args) {
2928

3029
try {
3130
// Initialize Tink configuration
32-
Config.register(AeadConfig.TINK_1_1_0);
31+
TinkConfig.register();
3332

3433
// GENERATE key
3534
// TODO key should only be generated once and then stored in a secure location.

0 commit comments

Comments
 (0)