- Clone Argon2 source:
git clone [email protected]:P-H-C/phc-winner-argon2.git
cd phc-winner-argon2.git
- Compile and test it:
make && make test
- Copy the library (name usually starts with
libargon2
) to a place of your choice - Set the Java system property
jna.library.path
to the directory where your library is stored. Example: The library is located in/home/moe/tmp/phc-winner-argon2/libargon2.so
. Start your Java application with-Djna.library.path=/home/moe/tmp/phc-winner-argon2/
- If it doesn't work, set the Java system property
jna.debug_load
totrue
. This will print JNA library lookup details to the console. Example:-Djna.debug_load=true
You can make it available to JNA by placing them under your resources/{OS}_{ARCH}
. In this case you don't need to use any extra system property.
Check the JNA getting started guide for details.
make install
- Now Argon2-JVM should find it and use it. No need to set additional properties