Skip to content

Commit 66177ca

Browse files
committed
lowered required Java version to Java 7
1 parent 8ae2e36 commit 66177ca

File tree

4 files changed

+5
-28
lines changed

4 files changed

+5
-28
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<attribute name="maven.pomderived" value="true"/>
1313
</attributes>
1414
</classpathentry>
15-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
15+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
1616
<attributes>
1717
<attribute name="maven.pomderived" value="true"/>
1818
</attributes>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>de.ntcomputer.crypto</groupId>
55
<artifactId>eddsa</artifactId>
6-
<version>1.0.1-SNAPSHOT</version>
6+
<version>1.0.0</version>
77
<name>ed25519-java</name>
88
<description>Implementation of EdDSA in Java including simplified access interfaces</description>
99
<url>https://github.com/DevCybran/ed25519-java</url>
@@ -47,8 +47,8 @@
4747
<groupId>org.apache.maven.plugins</groupId>
4848
<artifactId>maven-compiler-plugin</artifactId>
4949
<configuration>
50-
<source>1.8</source>
51-
<target>1.8</target>
50+
<source>1.7</source>
51+
<target>1.7</target>
5252
<encoding>${project.build.sourceEncoding}</encoding>
5353
</configuration>
5454
<version>3.1</version>

src/de/ntcomputer/crypto/eddsa/Ed25519PrivateKey.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import javax.crypto.spec.IvParameterSpec;
2727
import javax.crypto.spec.PBEKeySpec;
2828
import javax.crypto.spec.SecretKeySpec;
29-
import javax.security.auth.DestroyFailedException;
30-
import javax.security.auth.Destroyable;
3129

3230
import de.ntcomputer.crypto.hash.HashCondenser;
3331
import de.ntcomputer.crypto.hash.ProgressListener;
@@ -49,7 +47,7 @@
4947
* @author DevCybran
5048
*
5149
*/
52-
public class Ed25519PrivateKey implements Destroyable {
50+
public class Ed25519PrivateKey {
5351
static final EdDSAParameterSpec P_SPEC = EdDSANamedCurveTable.getByName(EdDSANamedCurveTable.CURVE_ED25519_SHA512);
5452
private static SecureRandom random = null;
5553
private final EdDSAPrivateKey key;
@@ -134,11 +132,6 @@ public static Ed25519PrivateKey loadFromString(String privateKeyString, char[] p
134132
throw new RuntimeException(e);
135133
} catch (BadPaddingException e) {
136134
throw new InvalidKeyException("the supplied private key is corrupted or the password is wrong", e);
137-
} finally {
138-
try {
139-
key.destroy();
140-
} catch (DestroyFailedException e) {
141-
}
142135
}
143136
}
144137

@@ -211,11 +204,6 @@ public String saveAsString(char[] password) throws IllegalArgumentException, NoS
211204
return Utils.bytesToHex(salt) + Utils.bytesToHex(iv) + Utils.bytesToHex(encryptedKey);
212205
} catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) {
213206
throw new RuntimeException(e);
214-
} finally {
215-
try {
216-
key.destroy();
217-
} catch (DestroyFailedException e) {
218-
}
219207
}
220208
}
221209

@@ -334,14 +322,4 @@ public void signToFile(File source, File signatureFile, ProgressListener listene
334322
Files.write(signatureFile.toPath(), signature.getBytes(StandardCharsets.UTF_8));
335323
}
336324

337-
@Override
338-
public void destroy() throws DestroyFailedException {
339-
this.key.destroy();
340-
}
341-
342-
@Override
343-
public boolean isDestroyed() {
344-
return this.key.isDestroyed();
345-
}
346-
347325
}

src/de/ntcomputer/crypto/hash/ProgressListener.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package de.ntcomputer.crypto.hash;
22

3-
@FunctionalInterface
43
public interface ProgressListener {
54

65
public void onProgress(long progress, long limit);

0 commit comments

Comments
 (0)