Skip to content

(Android) Networking and Cryptography Library (NaCL) JNI binding

License

Notifications You must be signed in to change notification settings

ut11/libsodium-jni

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

libsodium-jni - (Android) 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.

If you do use this project in your research project, please do cite this repo. Thanks!

Credits to:

Installation

  • Java package is under org.libsodium.jni
  • Maven coordinates are in the Sonatype OSS snapshot repository. View all artifacts here

Android Archive (AAR)

<dependency>
    <groupId>com.github.joshjdevl.libsodiumjni</groupId>
    <artifactId>libsodium-jni-aar</artifactId>
    <version>1.0.2-SNAPSHOT</version>
    <type>aar</type>
</dependency>

Java Archive (JAR)

<dependency>
    <groupId>com.github.joshjdevl.libsodiumjni</groupId>
    <artifactId>libsodium-jni</artifactId>
    <version>1.0.2-SNAPSHOT</version>
    <type>jar</type>
</dependency>

MacOS Manual Compilation and Installation

Install brew

Run ./build-mac.sh

Linux Manual Compilation and Installation

Run ./build-linux.sh

To use the example app

Clone the repo and import project from folder example/Sodium in Android studio (Android studio 2.1). Android studio will handle the rest. Compile and run. Tested to emulators down to Android Version 16.

AAR usage

To use the AAR project as is (No .SO file imports needed).

It is also possible to build the AAR library yourself using the provided scripts linux or mac. After building the library open module settings and add the libsodium-jni-release.aar and/or libsodium-jni-debug.aar as a dependency.

Custom code usage

To use the library with your own custom code, skip the aar file and add

  1. The native .SO libraries in your project (Create jnilibs folder and make the required changes to the gradle file)
  2. Add the source code from the src folder and add your own additional code.

###Docker Container

The docker container is available from libsodium-jni which is a Automated Build.

Manual compilation and installation

Please refer to the docker build for the commands used to build.

Notes

Docker container

Issues / Improvements / Help Seeked

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

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

About

(Android) Networking and Cryptography Library (NaCL) JNI binding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 93.3%
  • Shell 4.5%
  • Makefile 1.3%
  • Ruby 0.9%