Skip to content
Integration examples of Tanker's client-side encryption SDKs
JavaScript Java Objective-C Python CSS HTML Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
config
server
tests
.gitignore
.gitlab-ci.yml chore(ci): use base docker image Jul 18, 2019
LICENSE doc(readme): reorganize + small additions Feb 27, 2019
README.md
config.in.json
package.json
requirements.lock
run-ci.py
setup.py
yarn.lock

README.md

Tanker logo

License Platform Last Commit

Integration examples of encryption SDKs

Overview · Prerequisites · Start the server · Run examples · Documentation · License

Overview

Tanker is an open-source client SDK that can be embedded in any application.

It leverages powerful client-side encryption of any type of data, textual or binary, but without performance loss and assuring a seamless end-user experience. No cryptographic skills are required.

This repository features example applications using the JavaScript, iOS, and Android encryption SDKs.

Prerequisites

Setup

Developing on Windows? Click here to display additional instructions.

↡↡↡↡↡↡↡↡↡↡ Windows instructions ↡↡↡↡↡↡↡↡↡↡


On Windows 10 version 1607 or later, the easiest way to run the quickstart examples is by installing the Windows Subsystem for Linux.

Although it is possible to set up a Node.js stack on older Windows versions, the amount of work required is out of the scope of this guide.

Once you have enabled Windows Subsystem for Linux, open a new Command Prompt instance and type the following:

bash

Your Command Prompt instance should now be a Bash instance.

For the record, you can access your Windows C:\ drive at anytime under /mnt/c.

Let's update the repo lists and packages:

sudo apt update -y && sudo apt upgrade -y

Install Node.js:

sudo apt install nodejs

Install Yarn by following the Ubuntu instructions on yarnpkg.com.

↟↟↟↟↟↟↟↟↟↟ Windows instructions ↟↟↟↟↟↟↟↟↟↟


Check your Node.js and Yarn versions, and upgrade if needed:

node -v  # >= 8    (async/await support)
yarn -v  # >= 1.0  (workspaces support)

We recommend using yarn rather than npm, as it will manage the dependencies of all the applications for you from the root of the repository.

Install the project

Clone this repository:

git clone https://github.com/TankerHQ/quickstart-examples.git

Install all dependencies at once:

cd quickstart-examples && yarn

Create a Tanker App

To create a Tanker App, create a free account on the dashboard and follow the instructions. Make sure you store the configuration file safely, as you'll need it later.

Once you start building real private applications, you can just create other Tanker Apps.

Configure

Take the JSON configuration file from the previous step and copy it under the config/ folder.

Note that the JSON configuration file can have any name ending with the .json extension and must have the following format:

// e.g. config/app.json
{
    "appId": "...",
    "appSecret": "..."
}

That's all you need to start the server and applications!

Start the example server

Start the example server in a terminal with:

yarn start:server

The example server provides applications with:

  • a mock auth system
  • an endpoint to retrieve user tokens as needed by the Tanker SDK
  • a couple of routes to upload/download user data

You may also provide the path of a config file explicitely:

yarn start:server --config <path>

Run example applications

Note: before running any of the example applications, don't forget to always start the server first!

Go to the homepage of the example server in your browser:

http://127.0.0.1:8080/

On this page, you will find all the instructions needed to run the example applications.

Documentation

For more details and to go beyond the example applications, please refer to:

License

The Tanker iOS SDK is licensed under the Apache License, version 2.0.

You can’t perform that action at this time.