diff --git a/app/build.gradle b/app/build.gradle index 1dbf468..1d38728 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,6 +9,7 @@ dependencies { implementation 'org.apache.commons:commons-text' implementation 'commons-cli:commons-cli' implementation project(':lib') + implementation project(':ext') // might be removed if I move BC ops to the lib testImplementation 'org.bouncycastle:bcpkix-jdk18on' } diff --git a/app/src/main/java/zeroecho/CovertCommand.java b/app/src/main/java/zeroecho/CovertCommand.java index 96a7ea5..dcff5f9 100644 --- a/app/src/main/java/zeroecho/CovertCommand.java +++ b/app/src/main/java/zeroecho/CovertCommand.java @@ -51,8 +51,8 @@ import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import zeroecho.sdk.integrations.covert.jpeg.JpegExifEmbedder; -import zeroecho.sdk.integrations.covert.jpeg.Slot; +import zeroecho.ext.integrations.covert.jpeg.JpegExifEmbedder; +import zeroecho.ext.integrations.covert.jpeg.Slot; /** * Command-line extension of ZeroEcho for covert embedding and extraction of diff --git a/ext/.classpath b/ext/.classpath new file mode 100644 index 0000000..8ce7b51 --- /dev/null +++ b/ext/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/.project b/ext/.project new file mode 100644 index 0000000..ba4440a --- /dev/null +++ b/ext/.project @@ -0,0 +1,23 @@ + + + ext + Project ext created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/ext/LICENSE b/ext/LICENSE new file mode 100644 index 0000000..808e688 --- /dev/null +++ b/ext/LICENSE @@ -0,0 +1,31 @@ +Copyright (C) 2026, Leo Galambos +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. All advertising materials mentioning features or use of this software must + display the following acknowledgement: + This product includes software developed by the Egothor project. + +4. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ext/build.gradle b/ext/build.gradle new file mode 100644 index 0000000..78314a7 --- /dev/null +++ b/ext/build.gradle @@ -0,0 +1,13 @@ +plugins { + id 'buildlogic.java-library-conventions' + id 'com.palantir.git-version' +} + +group='org.egothor' + +dependencies { + api 'org.bouncycastle:bcpkix-jdk18on' + implementation 'org.apache.commons:commons-imaging' + implementation project(':lib') + testImplementation 'org.egothor:conflux' +} diff --git a/lib/src/main/java/zeroecho/sdk/content/export/Base64Stream.java b/ext/src/main/java/zeroecho/ext/content/export/Base64Stream.java similarity index 99% rename from lib/src/main/java/zeroecho/sdk/content/export/Base64Stream.java rename to ext/src/main/java/zeroecho/ext/content/export/Base64Stream.java index 9dc1394..3baf768 100644 --- a/lib/src/main/java/zeroecho/sdk/content/export/Base64Stream.java +++ b/ext/src/main/java/zeroecho/ext/content/export/Base64Stream.java @@ -31,7 +31,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ -package zeroecho.sdk.content.export; +package zeroecho.ext.content.export; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/lib/src/main/java/zeroecho/sdk/content/export/PiwigoExportDataContent.java b/ext/src/main/java/zeroecho/ext/content/export/PiwigoExportDataContent.java similarity index 99% rename from lib/src/main/java/zeroecho/sdk/content/export/PiwigoExportDataContent.java rename to ext/src/main/java/zeroecho/ext/content/export/PiwigoExportDataContent.java index 27475d7..a133bac 100644 --- a/lib/src/main/java/zeroecho/sdk/content/export/PiwigoExportDataContent.java +++ b/ext/src/main/java/zeroecho/ext/content/export/PiwigoExportDataContent.java @@ -31,7 +31,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ -package zeroecho.sdk.content.export; +package zeroecho.ext.content.export; import java.io.BufferedWriter; import java.io.ByteArrayInputStream; diff --git a/lib/src/main/java/zeroecho/sdk/content/export/package-info.java b/ext/src/main/java/zeroecho/ext/content/export/package-info.java similarity index 86% rename from lib/src/main/java/zeroecho/sdk/content/export/package-info.java rename to ext/src/main/java/zeroecho/ext/content/export/package-info.java index d2b42ac..ec9c3fe 100644 --- a/lib/src/main/java/zeroecho/sdk/content/export/package-info.java +++ b/ext/src/main/java/zeroecho/ext/content/export/package-info.java @@ -36,10 +36,10 @@ * *

* This package provides streaming utilities and exportable content - * implementations that render {@link zeroecho.sdk.content.api.DataContent} for + * implementations that render {@link zeroecho.ext.content.api.DataContent} for * deployment to external platforms or for script-based transport. Exports can * be produced as raw bytes or as platform-specific scripts according to - * {@link zeroecho.sdk.content.api.ExportableDataContent.ExportMode}. + * {@link zeroecho.ext.content.api.ExportableDataContent.ExportMode}. *

* *

Scope

@@ -60,15 +60,15 @@ *
  • Piwigo uploader - an exportable content implementation * (package-private) that can either upload an image directly to a Piwigo server * or generate Bash/CMD scripts that reconstruct and upload the image. It is - * built on {@link zeroecho.sdk.content.api.AbstractExportableDataContent} and + * built on {@link zeroecho.ext.content.api.AbstractExportableDataContent} and * honors - * {@link zeroecho.sdk.content.api.ExportableDataContent.ExportMode}.
  • + * {@link zeroecho.ext.content.api.ExportableDataContent.ExportMode}. * * *

    Typical usage

    *

    Format a stream as Base64 command lines

    {@code
      * java.io.InputStream source = ... raw bytes ...;
    - * java.io.InputStream encoded = new zeroecho.sdk.content.export.Base64Stream(
    + * java.io.InputStream encoded = new zeroecho.ext.content.export.Base64Stream(
      *     source,
      *     "echo ".getBytes(java.nio.charset.StandardCharsets.UTF_8),
      *     76,
    @@ -78,8 +78,8 @@
      * }
    * *

    Render an exportable content in a chosen mode

    {@code
    - * zeroecho.sdk.content.api.ExportableDataContent content = ... some exportable content ...;
    - * content.setExportMode(zeroecho.sdk.content.api.ExportableDataContent.ExportMode.BASH_SCRIPT);
    + * zeroecho.ext.content.api.ExportableDataContent content = ... some exportable content ...;
    + * content.setExportMode(zeroecho.ext.content.api.ExportableDataContent.ExportMode.BASH_SCRIPT);
      * try (java.io.InputStream script = content.getStream()) {
      *     script.transferTo(out);
      * }
    @@ -87,7 +87,7 @@
      *
      * 

    Security notes

    *