Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jsyeo committed May 9, 2016
0 parents commit 601ae01
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>

<groupId>com.srcclr</groupId>
<artifactId>example-java-maven</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencies>
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>0.3m</version>
</dependency>
</dependencies>
</project>
13 changes: 13 additions & 0 deletions src/com/srcclr/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import org.mindrot.jbcrypt.BCrypt;

public class Main {

public static void main(String[] args) {
String candidate = args[0];
String hashed = BCrypt.hashpw(candidate, BCrypt.gensalt(12));

BCrypt.checkpw(candidate, hashed);
}

}

0 comments on commit 601ae01

Please sign in to comment.