A multiplatform implementation of bcrypt for Node and the JVM
Exposes Bcrypt hashing and function in two methods.
// Hash a given password using a given number of salt round.
val hash = Bcrypt.hash(password, SALT_ROUNDS)
// Verify a given password matches a previously hashed password
if (Bcrypt.verify(password, hash)) {
println("It's a match!")
}
The JVM implementation is build on Bcrypt Java Library
.
https://github.com/patrickfav/bcrypt
The JS implementation only supports NodeJS and is based on bcrypt
library.
https://github.com/kelektiv/node.bcrypt.js
The output artifacts are maven artifacts for common code, Javascript, and Java
Common: Use this if you are depending on Joise in a common module of an MPP project.
implementation("com.ToxicBakery.library.bcrypt:bcrypt:+")
Java
implementation("com.ToxicBakery.library.bcrypt:bcrypt:+")
JavaScript
implementation("com.ToxicBakery.library.bcrypt:bcrypt:+")
Requires OpenJDK 8+
./gradlew build