diff --git a/pom.xml b/pom.xml
index dacb6de..825861a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
1.81.8
- 3.0
+ 4.1https://nexus.locusworks.net
@@ -30,7 +30,7 @@
org.apache.maven.pluginsmaven-surefire-plugin
- 2.20.1
+ 3.0.0-M5always
@@ -38,22 +38,20 @@
org.apache.maven.pluginsmaven-compiler-plugin
- 3.7.0
+ 3.8.1${maven.compiler.source}${maven.compiler.target}
+ true
+
+ -Xlint:all
+ org.owaspdependency-check-maven
- 5.2.2
-
- true
- true
- false
- true
-
+ 6.3.1
@@ -67,13 +65,14 @@
license-maven-plugin${license-maven-plugin.version}
- false
- ${basedir}/licenses/LICENSE.template
- true
- true
-
- **/*.java
-
+
+
+ ${project.baseUri}/licenses/LICENSE.template
+
+ **/*.java
+
+
+
- junit
- junit
- 4.12
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.8.0test
+
commons-iocommons-io
- 2.6
+ 2.11.0commons-codeccommons-codec
- 1.14
+ 1.15
@@ -116,14 +117,14 @@
com.google.guavaguava
- 28.1-jre
+ 30.1.1-jreorg.apache.commonscommons-lang3
- 3.9
+ 3.12.0
diff --git a/src/main/java/net/locusworks/crypto/AES.java b/src/main/java/net/locusworks/crypto/AES.java
index e245856..ff21cb8 100644
--- a/src/main/java/net/locusworks/crypto/AES.java
+++ b/src/main/java/net/locusworks/crypto/AES.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: AES.java
*
diff --git a/src/main/java/net/locusworks/crypto/AESKey.java b/src/main/java/net/locusworks/crypto/AESKey.java
index 1158c26..eac8e7b 100644
--- a/src/main/java/net/locusworks/crypto/AESKey.java
+++ b/src/main/java/net/locusworks/crypto/AESKey.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: AESKey.java
*
diff --git a/src/main/java/net/locusworks/crypto/AESKeySpec.java b/src/main/java/net/locusworks/crypto/AESKeySpec.java
index a05be56..9ccb7f6 100644
--- a/src/main/java/net/locusworks/crypto/AESKeySpec.java
+++ b/src/main/java/net/locusworks/crypto/AESKeySpec.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: AESKeySpec.java
*
diff --git a/src/main/java/net/locusworks/crypto/EncryptionKeyFactory.java b/src/main/java/net/locusworks/crypto/EncryptionKeyFactory.java
index eeaddef..31ea1f6 100644
--- a/src/main/java/net/locusworks/crypto/EncryptionKeyFactory.java
+++ b/src/main/java/net/locusworks/crypto/EncryptionKeyFactory.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: EncryptionKeyFactory.java
*
diff --git a/src/main/java/net/locusworks/crypto/HashSalt.java b/src/main/java/net/locusworks/crypto/HashSalt.java
index ff4ea97..2a8a78d 100644
--- a/src/main/java/net/locusworks/crypto/HashSalt.java
+++ b/src/main/java/net/locusworks/crypto/HashSalt.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: HashSalt.java
*
diff --git a/src/main/java/net/locusworks/crypto/KeyFile.java b/src/main/java/net/locusworks/crypto/KeyFile.java
index 3888460..684eaec 100644
--- a/src/main/java/net/locusworks/crypto/KeyFile.java
+++ b/src/main/java/net/locusworks/crypto/KeyFile.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: KeyFile.java
*
diff --git a/src/main/java/net/locusworks/crypto/RSA.java b/src/main/java/net/locusworks/crypto/RSA.java
index 6579bf2..2ddeb59 100644
--- a/src/main/java/net/locusworks/crypto/RSA.java
+++ b/src/main/java/net/locusworks/crypto/RSA.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: RSA.java
*
diff --git a/src/main/java/net/locusworks/crypto/SSHEncodedKeySpec.java b/src/main/java/net/locusworks/crypto/SSHEncodedKeySpec.java
index b0869c7..929d388 100644
--- a/src/main/java/net/locusworks/crypto/SSHEncodedKeySpec.java
+++ b/src/main/java/net/locusworks/crypto/SSHEncodedKeySpec.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: SSHEncodedKeySpec.java
*
diff --git a/src/main/java/net/locusworks/crypto/configuration/ConfigurationCallback.java b/src/main/java/net/locusworks/crypto/configuration/ConfigurationCallback.java
index 4ae0c9c..38f1339 100644
--- a/src/main/java/net/locusworks/crypto/configuration/ConfigurationCallback.java
+++ b/src/main/java/net/locusworks/crypto/configuration/ConfigurationCallback.java
@@ -1,3 +1,30 @@
+/*
+ *
+ * Project: Crypto, File: ConfigurationCallback.java
+ *
+ * Copyright 2019 Locusworks LLC.
+ * All rights reserved. Federal copyright law prohibits unauthorized reproduction by
+ * any means and imposes fines up to $25,000 for violation. No part of this material
+ * may be reproduced, transmitted, transcribed, stored in a retrieval system, copied,
+ * modified, duplicated, adapted or translated into another program language in any
+ * form or by any means, electronic, mechanical, photocopying, recording, or
+ * otherwise, without the prior written permission from Locusworks. Locusworks
+ * affirms that Crypto(R) software and data is subject to United States
+ * Government Purpose Rights. Contact Locusworks, 1313 Lawnview Drive
+ * Forney TX 75126, (802) 488-0438, for commercial licensing opportunities.
+ *
+ * IN NO EVENT SHALL LOCUSWORKS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF LOCUSWORKS HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NO RESPONSIBILITY IS ASSUMED BY
+ * LOCUSWORKS FOR ITS USE, OR FOR ANY INFRINGEMENTS OF PATENTS OR OTHER RIGHTS OF
+ * THIRD PARTIES RESULTING FROM ITS USE. LOCUSWORKS SPECIFICALLY DISCLAIMS ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND
+ * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". LOCUSWORKS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ */
package net.locusworks.crypto.configuration;
@FunctionalInterface
diff --git a/src/main/java/net/locusworks/crypto/configuration/ConfigurationManager.java b/src/main/java/net/locusworks/crypto/configuration/ConfigurationManager.java
index 3aa3464..dc4c767 100644
--- a/src/main/java/net/locusworks/crypto/configuration/ConfigurationManager.java
+++ b/src/main/java/net/locusworks/crypto/configuration/ConfigurationManager.java
@@ -1,3 +1,30 @@
+/*
+ *
+ * Project: Crypto, File: ConfigurationManager.java
+ *
+ * Copyright 2019 Locusworks LLC.
+ * All rights reserved. Federal copyright law prohibits unauthorized reproduction by
+ * any means and imposes fines up to $25,000 for violation. No part of this material
+ * may be reproduced, transmitted, transcribed, stored in a retrieval system, copied,
+ * modified, duplicated, adapted or translated into another program language in any
+ * form or by any means, electronic, mechanical, photocopying, recording, or
+ * otherwise, without the prior written permission from Locusworks. Locusworks
+ * affirms that Crypto(R) software and data is subject to United States
+ * Government Purpose Rights. Contact Locusworks, 1313 Lawnview Drive
+ * Forney TX 75126, (802) 488-0438, for commercial licensing opportunities.
+ *
+ * IN NO EVENT SHALL LOCUSWORKS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF LOCUSWORKS HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NO RESPONSIBILITY IS ASSUMED BY
+ * LOCUSWORKS FOR ITS USE, OR FOR ANY INFRINGEMENTS OF PATENTS OR OTHER RIGHTS OF
+ * THIRD PARTIES RESULTING FROM ITS USE. LOCUSWORKS SPECIFICALLY DISCLAIMS ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND
+ * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". LOCUSWORKS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ */
package net.locusworks.crypto.configuration;
import java.io.IOException;
diff --git a/src/main/java/net/locusworks/crypto/configuration/PersistableRequest.java b/src/main/java/net/locusworks/crypto/configuration/PersistableRequest.java
index 79385fe..6f2a1db 100644
--- a/src/main/java/net/locusworks/crypto/configuration/PersistableRequest.java
+++ b/src/main/java/net/locusworks/crypto/configuration/PersistableRequest.java
@@ -1,3 +1,30 @@
+/*
+ *
+ * Project: Crypto, File: PersistableRequest.java
+ *
+ * Copyright 2019 Locusworks LLC.
+ * All rights reserved. Federal copyright law prohibits unauthorized reproduction by
+ * any means and imposes fines up to $25,000 for violation. No part of this material
+ * may be reproduced, transmitted, transcribed, stored in a retrieval system, copied,
+ * modified, duplicated, adapted or translated into another program language in any
+ * form or by any means, electronic, mechanical, photocopying, recording, or
+ * otherwise, without the prior written permission from Locusworks. Locusworks
+ * affirms that Crypto(R) software and data is subject to United States
+ * Government Purpose Rights. Contact Locusworks, 1313 Lawnview Drive
+ * Forney TX 75126, (802) 488-0438, for commercial licensing opportunities.
+ *
+ * IN NO EVENT SHALL LOCUSWORKS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF LOCUSWORKS HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NO RESPONSIBILITY IS ASSUMED BY
+ * LOCUSWORKS FOR ITS USE, OR FOR ANY INFRINGEMENTS OF PATENTS OR OTHER RIGHTS OF
+ * THIRD PARTIES RESULTING FROM ITS USE. LOCUSWORKS SPECIFICALLY DISCLAIMS ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND
+ * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". LOCUSWORKS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ */
package net.locusworks.crypto.configuration;
public interface PersistableRequest {
diff --git a/src/main/java/net/locusworks/crypto/configuration/PropertiesManager.java b/src/main/java/net/locusworks/crypto/configuration/PropertiesManager.java
index 9368743..dc8afc8 100644
--- a/src/main/java/net/locusworks/crypto/configuration/PropertiesManager.java
+++ b/src/main/java/net/locusworks/crypto/configuration/PropertiesManager.java
@@ -1,3 +1,30 @@
+/*
+ *
+ * Project: Crypto, File: PropertiesManager.java
+ *
+ * Copyright 2019 Locusworks LLC.
+ * All rights reserved. Federal copyright law prohibits unauthorized reproduction by
+ * any means and imposes fines up to $25,000 for violation. No part of this material
+ * may be reproduced, transmitted, transcribed, stored in a retrieval system, copied,
+ * modified, duplicated, adapted or translated into another program language in any
+ * form or by any means, electronic, mechanical, photocopying, recording, or
+ * otherwise, without the prior written permission from Locusworks. Locusworks
+ * affirms that Crypto(R) software and data is subject to United States
+ * Government Purpose Rights. Contact Locusworks, 1313 Lawnview Drive
+ * Forney TX 75126, (802) 488-0438, for commercial licensing opportunities.
+ *
+ * IN NO EVENT SHALL LOCUSWORKS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF LOCUSWORKS HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NO RESPONSIBILITY IS ASSUMED BY
+ * LOCUSWORKS FOR ITS USE, OR FOR ANY INFRINGEMENTS OF PATENTS OR OTHER RIGHTS OF
+ * THIRD PARTIES RESULTING FROM ITS USE. LOCUSWORKS SPECIFICALLY DISCLAIMS ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND
+ * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". LOCUSWORKS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ */
package net.locusworks.crypto.configuration;
import java.io.BufferedReader;
diff --git a/src/main/java/net/locusworks/crypto/package-info.java b/src/main/java/net/locusworks/crypto/package-info.java
index 009cd1e..5e1b8b7 100644
--- a/src/main/java/net/locusworks/crypto/package-info.java
+++ b/src/main/java/net/locusworks/crypto/package-info.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: package-info.java
*
diff --git a/src/main/java/net/locusworks/crypto/utils/DataOutputStreamHelper.java b/src/main/java/net/locusworks/crypto/utils/DataOutputStreamHelper.java
index 2ebbfed..7ee2ca3 100644
--- a/src/main/java/net/locusworks/crypto/utils/DataOutputStreamHelper.java
+++ b/src/main/java/net/locusworks/crypto/utils/DataOutputStreamHelper.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: DataOutputStreamHelper.java
*
diff --git a/src/main/java/net/locusworks/crypto/utils/HashUtils.java b/src/main/java/net/locusworks/crypto/utils/HashUtils.java
index ca568cf..8be3025 100644
--- a/src/main/java/net/locusworks/crypto/utils/HashUtils.java
+++ b/src/main/java/net/locusworks/crypto/utils/HashUtils.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: HashUtils.java
*
diff --git a/src/main/java/net/locusworks/crypto/utils/RandomString.java b/src/main/java/net/locusworks/crypto/utils/RandomString.java
index 5dff5f5..bcbfca1 100644
--- a/src/main/java/net/locusworks/crypto/utils/RandomString.java
+++ b/src/main/java/net/locusworks/crypto/utils/RandomString.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: RandomString.java
*
diff --git a/src/test/java/net/locusworks/crypto/tests/AESEncryptionTest.java b/src/test/java/net/locusworks/crypto/tests/AESEncryptionTest.java
index 872e286..3aae2d2 100644
--- a/src/test/java/net/locusworks/crypto/tests/AESEncryptionTest.java
+++ b/src/test/java/net/locusworks/crypto/tests/AESEncryptionTest.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: AESEncryptionTest.java
*
@@ -28,8 +28,8 @@
package net.locusworks.crypto.tests;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
import net.locusworks.crypto.AES;
@@ -39,10 +39,10 @@ public class AESEncryptionTest {
public void testEncryption() {
try {
String encrypted = AES.createInstance().encrypt("hello world");
- Assert.assertTrue(String.format("Encrypted String is not blank? :%s", encrypted), !StringUtils.isBlank(encrypted));
+ assertTrue(StringUtils.isNotBlank(encrypted), String.format("Encrypted String is not blank? :%s", encrypted));
} catch (Exception ex) {
ex.printStackTrace(System.err);
- Assert.fail();
+ fail();
}
}
@@ -52,16 +52,18 @@ public class AESEncryptionTest {
try {
AES aes = AES.createInstance();
String encrypted = aes.encrypt(testString);
- Assert.assertTrue(String.format("Encrypted String is not blank? :%s", encrypted), !StringUtils.isBlank(encrypted));
-
+ assertTrue(StringUtils.isNotBlank(encrypted), String.format("Encrypted String is not blank? :%s", encrypted));
+
String decrypted = aes.decrypt(encrypted);
- Assert.assertTrue(String.format("Decrypted String is not blank? :%s", decrypted), !StringUtils.isBlank(encrypted));
-
- Assert.assertTrue("Test String and Original String the same? :%s", testString.equals(decrypted));
-
+ assertTrue(StringUtils.isNotBlank(encrypted), String.format("Decrypted String is not blank? :%s", decrypted));
+
+ boolean same = testString.equals(decrypted);
+
+ assertTrue(same, String.format("Test String and Original String the same? :%s", same));
+
} catch (Exception ex) {
ex.printStackTrace(System.err);
- Assert.fail();
+ fail();
}
}
diff --git a/src/test/java/net/locusworks/crypto/tests/HashSaltTest.java b/src/test/java/net/locusworks/crypto/tests/HashSaltTest.java
index 24a9c41..0029162 100644
--- a/src/test/java/net/locusworks/crypto/tests/HashSaltTest.java
+++ b/src/test/java/net/locusworks/crypto/tests/HashSaltTest.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: HashSaltTest.java
*
@@ -28,35 +28,35 @@
package net.locusworks.crypto.tests;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
import net.locusworks.crypto.HashSalt;
public class HashSaltTest {
-
- private static String samplePassword="Hello World";
- @Test
- public void testEncryption() {
- try {
- String hashSalt = HashSalt.createHash(samplePassword);
- Assert.assertTrue(String.format("Encrypted String is not blank? :%s", hashSalt), !StringUtils.isBlank(hashSalt));
- } catch(Exception ex) {
- Assert.fail();
- }
- }
-
- @Test
- public void testDecryption() {
- try {
- String hashSalt = HashSalt.createHash(samplePassword);
- boolean decrypted = HashSalt.validatePassword(samplePassword, hashSalt);
- Assert.assertTrue("Test String and Original String the same? :%s", decrypted);
- } catch(Exception ex) {
- Assert.fail();
- }
- }
+ private static String samplePassword="Hello World";
+
+ @Test
+ public void testEncryption() {
+ try {
+ String hashSalt = HashSalt.createHash(samplePassword);
+ assertTrue(StringUtils.isNotBlank(hashSalt), String.format("Encrypted String is not blank? :%s", hashSalt));
+ } catch(Exception ex) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testDecryption() {
+ try {
+ String hashSalt = HashSalt.createHash(samplePassword);
+ boolean decrypted = HashSalt.validatePassword(samplePassword, hashSalt);
+ assertTrue(decrypted, String.format("Test String and Original String the same? :%s", decrypted));
+ } catch(Exception ex) {
+ fail();
+ }
+ }
}
diff --git a/src/test/java/net/locusworks/crypto/tests/HashUtilsTest.java b/src/test/java/net/locusworks/crypto/tests/HashUtilsTest.java
index ad1f5fa..0ce8ad9 100644
--- a/src/test/java/net/locusworks/crypto/tests/HashUtilsTest.java
+++ b/src/test/java/net/locusworks/crypto/tests/HashUtilsTest.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: HashUtilsTest.java
*
@@ -27,38 +27,38 @@
*/
package net.locusworks.crypto.tests;
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
import org.apache.commons.codec.digest.DigestUtils;
-import org.junit.Test;
import net.locusworks.crypto.utils.HashUtils;
public class HashUtilsTest {
-
+
private static final String TEST_STRING = "Hello World";
@Test
public void testMD5() throws Exception {
String digestUtilsMD5 = DigestUtils.md5Hex(TEST_STRING.getBytes());
String hashUtilsMD5 = HashUtils.hash("MD5", TEST_STRING);
-
+
assertTrue(digestUtilsMD5.equals(hashUtilsMD5));
}
-
+
@Test
public void testSHA1() throws Exception {
String digestUtilsMD5 = DigestUtils.sha1Hex(TEST_STRING.getBytes());
String hashUtilsMD5 = HashUtils.hash("SHA-1", TEST_STRING);
-
+
assertTrue(digestUtilsMD5.equals(hashUtilsMD5));
}
-
+
@Test
public void testSHA512() throws Exception {
String digestUtilsMD5 = DigestUtils.sha512Hex(TEST_STRING.getBytes());
String hashUtilsMD5 = HashUtils.hash("SHA-512", TEST_STRING);
-
+
assertTrue(digestUtilsMD5.equals(hashUtilsMD5));
}
diff --git a/src/test/java/net/locusworks/crypto/tests/PropertiesManagerTest.java b/src/test/java/net/locusworks/crypto/tests/PropertiesManagerTest.java
index b91808a..e85b3c2 100644
--- a/src/test/java/net/locusworks/crypto/tests/PropertiesManagerTest.java
+++ b/src/test/java/net/locusworks/crypto/tests/PropertiesManagerTest.java
@@ -1,6 +1,35 @@
+/*
+ *
+ * Project: Crypto, File: PropertiesManagerTest.java
+ *
+ * Copyright 2019 Locusworks LLC.
+ * All rights reserved. Federal copyright law prohibits unauthorized reproduction by
+ * any means and imposes fines up to $25,000 for violation. No part of this material
+ * may be reproduced, transmitted, transcribed, stored in a retrieval system, copied,
+ * modified, duplicated, adapted or translated into another program language in any
+ * form or by any means, electronic, mechanical, photocopying, recording, or
+ * otherwise, without the prior written permission from Locusworks. Locusworks
+ * affirms that Crypto(R) software and data is subject to United States
+ * Government Purpose Rights. Contact Locusworks, 1313 Lawnview Drive
+ * Forney TX 75126, (802) 488-0438, for commercial licensing opportunities.
+ *
+ * IN NO EVENT SHALL LOCUSWORKS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF LOCUSWORKS HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NO RESPONSIBILITY IS ASSUMED BY
+ * LOCUSWORKS FOR ITS USE, OR FOR ANY INFRINGEMENTS OF PATENTS OR OTHER RIGHTS OF
+ * THIRD PARTIES RESULTING FROM ITS USE. LOCUSWORKS SPECIFICALLY DISCLAIMS ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND
+ * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". LOCUSWORKS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ */
package net.locusworks.crypto.tests;
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
import java.io.File;
import java.io.IOException;
@@ -8,8 +37,6 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Properties;
-import org.junit.AfterClass;
-import org.junit.Test;
import net.locusworks.crypto.configuration.PropertiesManager;
@@ -51,7 +78,7 @@ public class PropertiesManagerTest {
}
}
- @AfterClass
+ @AfterAll
public static void removeSavedProps() {
File tmp = new File(TMP_PROPS);
if (tmp.exists()) {
diff --git a/src/test/java/net/locusworks/crypto/tests/RandomStringTest.java b/src/test/java/net/locusworks/crypto/tests/RandomStringTest.java
index c0441bc..1037572 100644
--- a/src/test/java/net/locusworks/crypto/tests/RandomStringTest.java
+++ b/src/test/java/net/locusworks/crypto/tests/RandomStringTest.java
@@ -1,4 +1,4 @@
-/**
+/*
*
* Project: Crypto, File: RandomStringTest.java
*
@@ -27,9 +27,8 @@
*/
package net.locusworks.crypto.tests;
-import static org.junit.Assert.*;
-
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
import net.locusworks.crypto.utils.RandomString;
@@ -41,7 +40,7 @@ public class RandomStringTest {
assertTrue(RandomString.getBytes(length).length == length);
}
}
-
+
@Test
public void testStaticString() {
for (Integer length = 3; length < 50; length++) {