Giter Site home page Giter Site logo

holysheep / libsodium-jni Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshjdevl/libsodium-jni

0.0 1.0 0.0 1.35 MB

(Android) Networking and Cryptography Library (NaCL) JNI binding. Uses SWIG to generate Java JNI bindings. SWIG definitions are extensible to other languages.

License: Apache License 2.0

Shell 7.32% Java 90.41% Makefile 1.46% C 0.01% Ruby 0.81%

libsodium-jni's Introduction

This project is entirely maintained in my spare time. Donations are appreciated.

Bitcoin address: 1EC6j1f2sDGy9L8ma8FFfQyxt9mb9a6Xxy

Bitcoin Cash address: 1PSxB3DRCkeaZK7nSbJ1hoxbsWAXwM8Hyx

Ethereum address: 2f30c73e8d643356ebbcfee7013ccd03c05097fb

Peercoin address: PQUavHtRCLtevq75GhLCec41nvDtmM4wvf

Build Status Maven Central

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 repository

Android Archive (AAR)

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

Java Archive (JAR)

<dependency>
    <groupId>com.github.joshjdevl.libsodiumjni</groupId>
    <artifactId>libsodium-jni</artifactId>
    <version>1.0.7</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 currently being used in production. 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

gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 4524D716

SWIG Extensions

SWIG is used to generate the Java JNI bindings. This means that the same interface definition can be used to generate bindings for all languages supported by SWIG. The interface can be found here

libsodium-jni's People

Contributors

alexkeramidas avatar bufke avatar cameronhotchkies avatar codesorcery avatar folex avatar hbmartin avatar joshjdevl avatar nohum avatar pengj avatar ph0b avatar qmx avatar saulshanabrook avatar vipulnsward avatar vp-of-awesome avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.