blob: 0299483374e016393e80eabe50c1c1e159c786e7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>69</version>
</parent>
<artifactId>commons-crypto</artifactId>
<version>1.2.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Commons Crypto</name>
<description>
Apache Commons Crypto is a cryptographic library optimized with AES-NI (Advanced Encryption Standard New Instructions).
It provides Java API for both the cipher level and Java stream level.
Developers can use it to implement high-performance AES encryption/decryption with minimum code and effort.
Please note that Crypto doesn't implement the cryptographic algorithm such as AES directly.
It wraps OpenSSL and JCE which implements the algorithms.
Features
--------
1. Cipher API for low level cryptographic operations.
2. Java stream API (CryptoInputStream/CryptoOutputStream) for high level stream encryption/decryption.
3. Both optimized with high performance AES encryption/decryption. (1400 MB/s - 1700 MB/s throughput in modern Xeon processors).
4. JNI-based implementation to achieve comparable performance to the native C/C++ version based on OpenSsl.
5. Portable across various operating systems (currently only Linux/MacOSX/Windows);
Apache Commons Crypto loads the library according to your machine environment (it checks system properties, `os.name` and `os.arch`).
6. Simple usage. Add the commons-crypto-(version).jar file to your classpath.
Export restrictions
-------------------
This distribution includes cryptographic software.
The country in which you currently reside may have restrictions
on the import, possession, use, and/or re-export to another country,
of encryption software. BEFORE using any encryption software,
please check your country's laws, regulations and policies
concerning the import, possession, or use, and re-export of
encryption software, to see if this is permitted.
See &lt;http://www.wassenaar.org/&gt; for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS),
has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1,
which includes information security software using or performing
cryptographic functions with asymmetric algorithms.
The form and manner of this Apache Software Foundation distribution makes
it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception
(see the BIS Export Administration Regulations, Section 740.13)
for both object code and source code.
The following provides more details on the included cryptographic software:
* Commons Crypto use [Java Cryptography Extension](http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html) provided by Java
* Commons Crypto link to and use [OpenSSL](https://www.openssl.org/) ciphers
</description>
<!--
Notes on testing:
mvn -q exec:java -Dexec.mainClass=org.apache.commons.crypto.Crypto
- run a basic JNI test
mvn -q exec:java -Dexec.mainClass=org.apache.commons.crypto.jna.OpenSslJna
- run a basic JNA test
Running examples (these are under the test tree, so need test scope):
mvn -q -Dexec.classpathScope=test -Dexec.mainClass=org.apache.commons.crypto.examples.CLASSNAME
where CLASSNAME is CipherByteArrayExample, CipherByteBufferExample, RandomExample, StreamExample
Additional options
-Djna.debug_load - debug JNA loading
-Dcommons.crypto.debug - add some Commons Crypto debugging
See LIBRARY_NAMES.txt for details of SSL Cryptographic library overrides
-->
<inceptionYear>2016</inceptionYear>
<url>https://commons.apache.org/proper/commons-crypto/</url>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/CRYPTO</url>
</issueManagement>
<scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-crypto.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-crypto.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-crypto.git</url>
<tag>HEAD</tag>
</scm>
<ciManagement>
<system>GitHub</system>
<url>https://github.com/apache/commons-crypto/actions</url>
</ciManagement>
<distributionManagement>
<site>
<id>commons.site</id>
<name>Apache Commons Site</name>
<url>scm:svn:${commons.scmPubUrl}</url>
</site>
</distributionManagement>
<properties>
<commons.release.version>1.2.1</commons.release.version>
<commons.release.desc>(Java 8 or above)</commons.release.desc>
<!-- The RC version used in the staging repository URL. -->
<commons.rc.version>RC1</commons.rc.version>
<!-- The release to be used by japicmp for checking binary compatibility -->
<commons.bc.version>1.2.0</commons.bc.version>
<commons.componentid>crypto</commons.componentid>
<commons.module.name>org.apache.commons.crypto</commons.module.name>
<commons.jira.id>CRYPTO</commons.jira.id>
<commons.jira.pid>12320024</commons.jira.pid>
<project.inceptionYear>2016</project.inceptionYear>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- override parent default of iso-8859-1 -->
<commons.encoding>UTF-8</commons.encoding>
<commons.javadoc.java.link>https://docs.oracle.com/javase/8/docs/api/</commons.javadoc.java.link>
<checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
<checkstyle.resourceExcludes>LICENSE.txt, NOTICE.txt, **/maven-archiver/pom.properties</checkstyle.resourceExcludes>
<japicmp.skip>false</japicmp.skip>
<commons.release.isDistModule>true</commons.release.isDistModule>
<jna.version>5.14.0</jna.version>
<!-- Version 4.0.1 requires Java 11+; the version is overridden in a profile if necessary -->
<jakarta.xml.bind.version>4.0.2</jakarta.xml.bind.version>
<!-- The property "target.name" is used to specify the ant target, The "all" target will use
OsInfo.java to detect the OS info and arch to generate the native binary for detected platform.
User is able to specify the platform by maven profiles.-->
<target.name>all</target.name>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp>
</properties>
<profiles>
<profile>
<id>java8-10</id>
<activation>
<jdk>[1.8,11.0)</jdk>
</activation>
<properties>
<!-- Version 4.0.1 requires Java 11+ -->
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>
</properties>
</profile>
<profile>
<id>jacoco</id>
<activation>
<file>
<exists>src/site/resources/profile.jacoco</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/examples/*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${commons.jacoco.version}</version>
<configuration>
<excludes>
<exclude>**/examples/*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
</profile>
<!-- Profile to build and run the benchmarks. Use 'mvn test -Pbenchmark', and add '-Dbenchmark=foo' to run only the foo benchmark -->
<profile>
<id>benchmark</id>
<properties>
<skipTests>true</skipTests>
<benchmark>org.apache</benchmark>
<jmh.version>1.37</jmh.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Enable the compilation of the benchmarks -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${commons.compiler.version}</version>
<configuration combine.self="override">
<!-- Needs to agree with main compiler settings; reapply the args which are lost by the override -->
<compilerArgs>
<compilerArg>-h</compilerArg>
<compilerArg>target/jni-classes</compilerArg>
</compilerArgs>
<testIncludes>
<testInclude>**/*</testInclude>
</testIncludes>
</configuration>
</plugin>
<!-- Hook the benchmarks to the test phase -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>benchmark</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>org.openjdk.jmh.Main</argument>
<argument>-rf</argument>
<argument>json</argument>
<argument>-rff</argument>
<argument>target/jmh-result.json</argument>
<argument>${benchmark}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Allow testing of JNI code only -->
<profile>
<id>testjni</id>
<properties>
<!-- prevent JNA code from loading -->
<commons.crypto.OpenSslNativeJna>_</commons.crypto.OpenSslNativeJna>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/jna/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Allow testing of JNA code only -->
<profile>
<id>testjna</id>
<properties>
<!-- prevent JNI code from loading -->
<commons.crypto.OpenSslNativeJni>_</commons.crypto.OpenSslNativeJni>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/jna/**</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Allow testing with a packaged jar -->
<profile>
<id>test-with-jar</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<classesDirectory>/dev/null</classesDirectory>
<additionalClasspathElements>${project.build.directory}/${project.artifactId}-${project.version}.jar</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<defaultGoal>clean apache-rat:check verify japicmp:cmp spotbugs:check pmd:check checkstyle:check javadoc:javadoc</defaultGoal>
<resources>
<resource>
<directory>src/main/resources/</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${commons.compiler.version}</version>
<configuration>
<compilerArgs>
<compilerArg>-h</compilerArg>
<compilerArg>target/jni-classes</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Allow checkstyle to be run interactively; keep in sync with report config below -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/src/conf/checkstyle/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<suppressionsLocation>${basedir}/src/conf/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/src/conf/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<!-- Allow pmd to be run interactively; keep in sync with report config below -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<skipEmptyReport>false</skipEmptyReport>
<analysisCache>true</analysisCache>
<rulesets>
<ruleset>${basedir}/src/conf/pmd/pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<!-- Helper application -->
<Main-Class>org.apache.commons.crypto.Crypto</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<!-- define filter encoding -->
<propertiesEncoding>${commons.encoding}</propertiesEncoding>
</configuration>
<executions>
<execution>
<id>create-version-file</id>
<!-- change phase of maven-resource-plugin -->
<phase>generate-sources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>make</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="make" unless="maven.make.skip">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
<exec executable="make" failonerror="true" dir="${project.basedir}">
<env key="VERSION" value="${project.version}" />
<env key="PROJECT_NAME" value="${project.name}" />
<!-- For debugging: -->
<!-- <arg value="-d" /> -->
<arg value="${target.name}" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<testExcludes>
<testExclude>**/*Benchmark*</testExclude>
</testExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<configuration>
<ignorePathsToDelete>
<ignorePathToDelete>javadocs**</ignorePathToDelete>
</ignorePathsToDelete>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>verify</preparationGoals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<!-- These exclusions must agree with the ones in the report section -->
<excludes>
<exclude>.gitattributes</exclude>
<exclude>.gitignore</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>**/build/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<!-- Keep in sync with build config above -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/src/conf/checkstyle/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<suppressionsLocation>${basedir}/src/conf/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
<!-- We need to specify reportSets because 2.9.1 creates two reports -->
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/src/conf/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${commons.pmd.version}</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<skipEmptyReport>false</skipEmptyReport>
<analysisCache>true</analysisCache>
<rulesets>
<ruleset>${basedir}/src/conf/pmd/pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>Needs Work</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>FIXME</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>XXX</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Noteable Markers</displayName>
<tags>
<tag>
<matchString>NOTE</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>NOPMD</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>NOSONAR</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
</tagClasses>
</tagListOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<!-- These exclusions must agree with the ones in the build section -->
<excludes>
<exclude>.gitattributes</exclude>
<exclude>.gitignore</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>**/build/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.xml.bind.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<developers>
<developer>
<name>Aaron T Myers</name>
<email>atm@apache.org</email>
<id>atm</id>
</developer>
<developer>
<name>Andrew Wang</name>
<email>wang@apache.org</email>
<id>wang</id>
</developer>
<developer>
<name>Chris Nauroth</name>
<email>cnauroth@apache.org</email>
<id>cnauroth</id>
</developer>
<developer>
<name>Colin P. McCabe</name>
<email>cmccabe@apache.org</email>
<id>cmccabe</id>
</developer>
<developer>
<name>Dapeng Sun</name>
<email>sdp@apache.org</email>
<id>sdp</id>
</developer>
<developer>
<name>Dian Fu</name>
<email>dianfu@apache.org</email>
<id>dianfu</id>
</developer>
<developer>
<name>Dong Chen</name>
<email>dongc@apache.org</email>
<id>dongc</id>
</developer>
<developer>
<name>Ferdinand Xu</name>
<email>xuf@apache.org</email>
<id>xuf</id>
</developer>
<developer>
<name>Haifeng Chen</name>
<email>haifengchen@apache.org</email>
<id>haifengchen</id>
</developer>
<developer>
<name>Marcelo Vanzin</name>
<email>vanzin@apache.org</email>
<id>vanzin</id>
</developer>
<developer>
<name>Uma Maheswara Rao G</name>
<email>umamahesh@apache.org</email>
<id>umamahesh</id>
</developer>
<developer>
<name>Yi Liu</name>
<email>yliu@apache.org</email>
<id>yliu</id>
</developer>
<developer>
<id>ggregory</id>
<name>Gary Gregory</name>
<email>ggregory at apache.org</email>
<url>https://www.garygregory.com</url>
<organization>The Apache Software Foundation</organization>
<organizationUrl>https://www.apache.org/</organizationUrl>
<roles>
<role>PMC Member</role>
</roles>
<timezone>America/New_York</timezone>
<properties>
<picUrl>https://people.apache.org/~ggregory/img/garydgregory80.png</picUrl>
</properties>
</developer>
</developers>
<contributors>
<contributor>
<name>Colin Ma</name>
<email>junjie.ma@intel.com</email>
</contributor>
<contributor>
<name>Xianda Ke</name>
<email>xianda.ke@intel.com</email>
</contributor>
<contributor>
<name>Ke Jia</name>
<email>ke.a.jia@intel.com</email>
</contributor>
<contributor>
<name>George Kankava </name>
<email>george.kankava@devfactory.com</email>
</contributor>
<contributor>
<name>Tian Jianguo</name>
<email>jianguo.tian@intel.com</email>
</contributor>
<contributor>
<name>Adam Retter</name>
<organization>Evolved Binary</organization>
</contributor>
<contributor>
<name>Arturo Bernal</name>
</contributor>
</contributors>
</project>