A simple kotlin wrapper for a bcrypt java implementation
The main way of installing this library is
using jitpack.io
repositories {
// ...
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
// Replace TAG with the desired version
implementation("net.lsafer:bcrypt-kt:TAG")
}
This is just a wrapper, so the usage is almost similar:
val hash = BCryptKt.hash(thePassword)
if (BCryptKt.verify(thePassword, hash)) {
println("Password Match")
} else {
println("Password Mismatch")
}