/kalium-jni

Primary LanguageJavaApache License 2.0Apache-2.0

kalium-jni - Java JNI binding to the Networking and Cryptography (NaCl) library

A Java JNI binding (to allow for Java and Android integration) to Networking and Cryptography library by Daniel J. Bernstein. All the hard work of making a portable NaCl API version was done by Frank Denis on libsodium and kalium was totally inspired by Tony Arcieri's work with RbNaCl and kalium.

Requirements

Installation

###Shared Library and Jar File

Please install docker and then run the copy script

This will then pull the docker container from docker-libsodium which is a Trusted Build.

Manual compilation and installation

Please refer to the installation instructions for more details or the docker build

Add kalium-jni to your Android project

Add the generated .jar file (~/.m2/repository/org/abstractj/kalium/kalium-jni/x.x.x-SNAPSHOT.jar) in your android project or add as a maven dependency:

Add as a Maven dependency at your project:

<dependency>
    <groupId>org.abstractj.kalium</groupId>
    <artifactId>kalium-jni</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

Add libkaliumjni.so that you'll find inside libs folder(kalium-jni/libs) in jniLibs (src/main/jniLibs) folder of your project.

Notes

kalium-jni is a work in progress, feedback, bug reports and patches are always welcome.

Docker build

Docker container

Issues / Improvements / Help Seeked

if anyone understands travis-ci and how to configure maven tests to find jni libraries, please submit a patch or email me travis-ci build

the blake tests have been commented out, there were some strange jni errors

Everything has been tested and working on ubuntu 12.04 32bit and 64 bit, macos, and Android