From fd2f5d59cd7832c49d7d4877e4afc0bdebbc503c Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Thu, 29 Feb 2024 17:49:24 +0500 Subject: [PATCH] rename package --- README.md | 2 +- settings.gradle | 2 +- .../xconn/{cryptobox => cryptology}/HSalsa20.java | 2 +- .../xconn/{cryptobox => cryptology}/KeyPair.java | 2 +- .../io/xconn/{cryptobox => cryptology}/Main.java | 2 +- .../xconn/{cryptobox => cryptology}/SealedBox.java | 8 ++++---- .../xconn/{cryptobox => cryptology}/SecretBox.java | 4 ++-- .../io/xconn/{cryptobox => cryptology}/Util.java | 2 +- .../InteroperabilityTest.java | 2 +- .../{cryptobox => cryptology}/SealedBoxTest.java | 14 +++++++------- .../{cryptobox => cryptology}/SecretBoxTest.java | 10 +++++----- .../xconn/{cryptobox => cryptology}/UtilTest.java | 8 ++++---- 12 files changed, 29 insertions(+), 29 deletions(-) rename src/main/java/io/xconn/{cryptobox => cryptology}/HSalsa20.java (98%) rename src/main/java/io/xconn/{cryptobox => cryptology}/KeyPair.java (92%) rename src/main/java/io/xconn/{cryptobox => cryptology}/Main.java (80%) rename src/main/java/io/xconn/{cryptobox => cryptology}/SealedBox.java (94%) rename src/main/java/io/xconn/{cryptobox => cryptology}/SecretBox.java (98%) rename src/main/java/io/xconn/{cryptobox => cryptology}/Util.java (98%) rename src/test/java/io/xconn/{cryptobox => cryptology}/InteroperabilityTest.java (99%) rename src/test/java/io/xconn/{cryptobox => cryptology}/SealedBoxTest.java (86%) rename src/test/java/io/xconn/{cryptobox => cryptology}/SecretBoxTest.java (92%) rename src/test/java/io/xconn/{cryptobox => cryptology}/UtilTest.java (85%) diff --git a/README.md b/README.md index e7e8d95..28523bd 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# cryptobox-java +# cryptology-java libsodium compatible SealedBox and SecretBox implementation in Java diff --git a/settings.gradle b/settings.gradle index c752d6b..6b7fac1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = 'cryptobox' +rootProject.name = 'cryptology' diff --git a/src/main/java/io/xconn/cryptobox/HSalsa20.java b/src/main/java/io/xconn/cryptology/HSalsa20.java similarity index 98% rename from src/main/java/io/xconn/cryptobox/HSalsa20.java rename to src/main/java/io/xconn/cryptology/HSalsa20.java index 9834dd7..f69cadb 100644 --- a/src/main/java/io/xconn/cryptobox/HSalsa20.java +++ b/src/main/java/io/xconn/cryptology/HSalsa20.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.xconn.cryptobox; +package io.xconn.cryptology; import java.nio.charset.StandardCharsets; diff --git a/src/main/java/io/xconn/cryptobox/KeyPair.java b/src/main/java/io/xconn/cryptology/KeyPair.java similarity index 92% rename from src/main/java/io/xconn/cryptobox/KeyPair.java rename to src/main/java/io/xconn/cryptology/KeyPair.java index 4f6c727..0bc468f 100644 --- a/src/main/java/io/xconn/cryptobox/KeyPair.java +++ b/src/main/java/io/xconn/cryptology/KeyPair.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; public class KeyPair { private final byte[] publicKey; diff --git a/src/main/java/io/xconn/cryptobox/Main.java b/src/main/java/io/xconn/cryptology/Main.java similarity index 80% rename from src/main/java/io/xconn/cryptobox/Main.java rename to src/main/java/io/xconn/cryptology/Main.java index b70ea7c..c323e3d 100644 --- a/src/main/java/io/xconn/cryptobox/Main.java +++ b/src/main/java/io/xconn/cryptology/Main.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; public class Main { public static void main(String[] args) { diff --git a/src/main/java/io/xconn/cryptobox/SealedBox.java b/src/main/java/io/xconn/cryptology/SealedBox.java similarity index 94% rename from src/main/java/io/xconn/cryptobox/SealedBox.java rename to src/main/java/io/xconn/cryptology/SealedBox.java index e9c1a36..7dfcac9 100644 --- a/src/main/java/io/xconn/cryptobox/SealedBox.java +++ b/src/main/java/io/xconn/cryptology/SealedBox.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import org.bouncycastle.crypto.digests.Blake2bDigest; import org.bouncycastle.crypto.engines.XSalsa20Engine; @@ -8,9 +8,9 @@ import org.bouncycastle.math.ec.rfc7748.X25519; import org.bouncycastle.util.Arrays; -import static io.xconn.cryptobox.Util.MAC_SIZE; -import static io.xconn.cryptobox.Util.PUBLIC_KEY_BYTES; -import static io.xconn.cryptobox.Util.getX25519PublicKey; +import static io.xconn.cryptology.Util.MAC_SIZE; +import static io.xconn.cryptology.Util.PUBLIC_KEY_BYTES; +import static io.xconn.cryptology.Util.getX25519PublicKey; public class SealedBox { private static final byte[] HSALSA20_SEED = new byte[16]; diff --git a/src/main/java/io/xconn/cryptobox/SecretBox.java b/src/main/java/io/xconn/cryptology/SecretBox.java similarity index 98% rename from src/main/java/io/xconn/cryptobox/SecretBox.java rename to src/main/java/io/xconn/cryptology/SecretBox.java index 957998f..9d27cdf 100644 --- a/src/main/java/io/xconn/cryptobox/SecretBox.java +++ b/src/main/java/io/xconn/cryptology/SecretBox.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import java.security.MessageDigest; import java.util.Arrays; @@ -8,7 +8,7 @@ import org.bouncycastle.crypto.params.KeyParameter; import org.bouncycastle.crypto.params.ParametersWithIV; -import static io.xconn.cryptobox.Util.MAC_SIZE; +import static io.xconn.cryptology.Util.MAC_SIZE; public class SecretBox { diff --git a/src/main/java/io/xconn/cryptobox/Util.java b/src/main/java/io/xconn/cryptology/Util.java similarity index 98% rename from src/main/java/io/xconn/cryptobox/Util.java rename to src/main/java/io/xconn/cryptology/Util.java index 7c99511..0de9c54 100644 --- a/src/main/java/io/xconn/cryptobox/Util.java +++ b/src/main/java/io/xconn/cryptology/Util.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import java.security.SecureRandom; diff --git a/src/test/java/io/xconn/cryptobox/InteroperabilityTest.java b/src/test/java/io/xconn/cryptology/InteroperabilityTest.java similarity index 99% rename from src/test/java/io/xconn/cryptobox/InteroperabilityTest.java rename to src/test/java/io/xconn/cryptology/InteroperabilityTest.java index bc18eb4..f8759dd 100644 --- a/src/test/java/io/xconn/cryptobox/InteroperabilityTest.java +++ b/src/test/java/io/xconn/cryptology/InteroperabilityTest.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import java.security.GeneralSecurityException; import java.util.Arrays; diff --git a/src/test/java/io/xconn/cryptobox/SealedBoxTest.java b/src/test/java/io/xconn/cryptology/SealedBoxTest.java similarity index 86% rename from src/test/java/io/xconn/cryptobox/SealedBoxTest.java rename to src/test/java/io/xconn/cryptology/SealedBoxTest.java index 899654e..e9b4c84 100644 --- a/src/test/java/io/xconn/cryptobox/SealedBoxTest.java +++ b/src/test/java/io/xconn/cryptology/SealedBoxTest.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import org.bouncycastle.util.encoders.Hex; import org.junit.jupiter.api.BeforeAll; @@ -9,12 +9,12 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; -import static io.xconn.cryptobox.SealedBox.computeSharedSecret; -import static io.xconn.cryptobox.SealedBox.createNonce; -import static io.xconn.cryptobox.SealedBox.sealOpen; -import static io.xconn.cryptobox.SealedBox.seal; -import static io.xconn.cryptobox.Util.MAC_SIZE; -import static io.xconn.cryptobox.Util.PUBLIC_KEY_BYTES; +import static io.xconn.cryptology.SealedBox.computeSharedSecret; +import static io.xconn.cryptology.SealedBox.createNonce; +import static io.xconn.cryptology.SealedBox.sealOpen; +import static io.xconn.cryptology.SealedBox.seal; +import static io.xconn.cryptology.Util.MAC_SIZE; +import static io.xconn.cryptology.Util.PUBLIC_KEY_BYTES; public class SealedBoxTest { diff --git a/src/test/java/io/xconn/cryptobox/SecretBoxTest.java b/src/test/java/io/xconn/cryptology/SecretBoxTest.java similarity index 92% rename from src/test/java/io/xconn/cryptobox/SecretBoxTest.java rename to src/test/java/io/xconn/cryptology/SecretBoxTest.java index d92a04b..5d687e9 100644 --- a/src/test/java/io/xconn/cryptobox/SecretBoxTest.java +++ b/src/test/java/io/xconn/cryptology/SecretBoxTest.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import org.bouncycastle.util.encoders.Hex; import org.junit.jupiter.api.BeforeAll; @@ -7,10 +7,10 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertThrows; -import static io.xconn.cryptobox.Util.MAC_SIZE; -import static io.xconn.cryptobox.SecretBox.box; -import static io.xconn.cryptobox.SecretBox.boxOpen; -import static io.xconn.cryptobox.SecretBox.checkLength; +import static io.xconn.cryptology.Util.MAC_SIZE; +import static io.xconn.cryptology.SecretBox.box; +import static io.xconn.cryptology.SecretBox.boxOpen; +import static io.xconn.cryptology.SecretBox.checkLength; public class SecretBoxTest { diff --git a/src/test/java/io/xconn/cryptobox/UtilTest.java b/src/test/java/io/xconn/cryptology/UtilTest.java similarity index 85% rename from src/test/java/io/xconn/cryptobox/UtilTest.java rename to src/test/java/io/xconn/cryptology/UtilTest.java index 9e79fb9..e3461a8 100644 --- a/src/test/java/io/xconn/cryptobox/UtilTest.java +++ b/src/test/java/io/xconn/cryptology/UtilTest.java @@ -1,4 +1,4 @@ -package io.xconn.cryptobox; +package io.xconn.cryptology; import java.security.SecureRandom; @@ -7,9 +7,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static io.xconn.cryptobox.Util.PUBLIC_KEY_BYTES; -import static io.xconn.cryptobox.Util.generateX25519KeyPair; -import static io.xconn.cryptobox.Util.getX25519PublicKey; +import static io.xconn.cryptology.Util.PUBLIC_KEY_BYTES; +import static io.xconn.cryptology.Util.generateX25519KeyPair; +import static io.xconn.cryptology.Util.getX25519PublicKey; public class UtilTest {