Skip to content

Integration examples of Tanker's client-side encryption SDKs

License

Notifications You must be signed in to change notification settings

Mandy910/quickstart-examples

 
 

Repository files navigation

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.

About

Integration examples of Tanker's client-side encryption SDKs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 46.1%
  • Java 21.8%
  • Objective-C 17.2%
  • Python 9.8%
  • CSS 2.6%
  • HTML 2.4%
  • Ruby 0.1%