argon2jni is a JNI (Java Native Interface) wrapper using the official Argon2 C library.
Argon2 is a memory and computing intensive hash function. It was built to be used as a Key Derivation Function and, as such, it is suitable for Password Hashing. It was one of the candidates of the Password Hashing Competition, in which it was selected as the final winner.
This wrapper library makes it usable from the Java programming language and Android in particular.
This repository can be cloned project using
git clone --recursive "https://github.com/marcoh00/argon2jni.git"
When using Android it can be imported as a module from Android Studio by choosing:
File > New > Import Module...
Make sure you compile it as a dependency of your main project. Inside build.gradle:
dependencies {
// ...
compile project(':argon2jni')
// ...
}
When using plain java, you can use a precompiled JAR file, which will be provided in the future. In the meantime, you have to include the source code in some way. The JNI library can be built using CMake. The CMakeLists.txt builds just fine as long as JNI headers are installed. It does not have any dependencies on Android.