-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to maven sub-modules and add CLI module
Rename the parent default module to "bcrypt-core" and add boilerplate for CLI. refs #5
- Loading branch information
1 parent
9af69d6
commit 273a9ae
Showing
27 changed files
with
230 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>bcrypt-parent</artifactId> | ||
<groupId>at.favre.lib</groupId> | ||
<version>0.4.0</version> | ||
</parent> | ||
|
||
<artifactId>bcrypt-cli</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>BCrypt CLI Tool</name> | ||
<description>A companion CLI tool for the bcrypt library for java.</description> | ||
|
||
<properties> | ||
<maven.deploy.skip>true</maven.deploy.skip> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.1.1</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<minimizeJar>true</minimizeJar> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
<dependencyReducedPomLocation> | ||
${java.io.tmpdir}/dependency-reduced-pom.xml | ||
</dependencyReducedPomLocation> | ||
<relocations> | ||
<relocation> | ||
<pattern>com.acme.coyote</pattern> | ||
<shadedPattern>hidden.coyote</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>at.favre.lib.crypto.bcrypt.cli.Cli</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.nicoulaj.maven.plugins</groupId> | ||
<artifactId>checksum-maven-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>artifacts</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<algorithms> | ||
<algorithm>SHA-256</algorithm> | ||
</algorithms> | ||
<shasumSummary>true</shasumSummary> | ||
<shasumSummaryFile>checksum-sha256.txt</shasumSummaryFile> | ||
<attachChecksums>false</attachChecksums> | ||
<quiet>false</quiet> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>at.favre.lib</groupId> | ||
<artifactId>bcrypt-core</artifactId> | ||
<version>0.4.0</version> | ||
</dependency> | ||
|
||
<!-- test --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
bcrypt-cli/src/main/java/at/favre/lib/crypto/bcrypt/cli/Cli.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package at.favre.lib.crypto.bcrypt.cli; | ||
|
||
import at.favre.lib.crypto.bcrypt.BCrypt; | ||
|
||
public class Cli { | ||
public static void main(String[] args) { | ||
System.out.println(BCrypt.withDefaults().hashToString(4, "asdasd".toCharArray())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>bcrypt-parent</artifactId> | ||
<groupId>at.favre.lib</groupId> | ||
<version>0.4.0</version> | ||
</parent> | ||
|
||
<artifactId>bcrypt-core</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>BCrypt Password Hashing Function</name> | ||
<description>Bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the | ||
Blowfish cipher. The core of this implementation is based on jBcrypt, but heavily refactored, modernized and | ||
with a lot of updates and enhancements. | ||
</description> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.0.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.0.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.nicoulaj.maven.plugins</groupId> | ||
<artifactId>checksum-maven-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>artifacts</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<algorithms> | ||
<algorithm>SHA-256</algorithm> | ||
</algorithms> | ||
<shasumSummary>true</shasumSummary> | ||
<shasumSummaryFile>checksum-sha256.txt</shasumSummaryFile> | ||
<attachChecksums>false</attachChecksums> | ||
<quiet>false</quiet> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>at.favre.lib</groupId> | ||
<artifactId>bytes</artifactId> | ||
<version>0.4.6</version> | ||
</dependency> | ||
|
||
<!-- test --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mindrot</groupId> | ||
<artifactId>jbcrypt</artifactId> | ||
<version>0.4</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-jdk15on</artifactId> | ||
<version>1.60</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters