Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zerokit-web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerokit-web-sdk

The Web SDK of ZeroKit

  • 4.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ZeroKit Web SDK

Build Status

This is the Web SDK of ZeroKit, that lets you enable secure authentication and end-to-end encryption in your application. It deals with password inputs, encryption and sharing, separating all the code that handles encryption keys and authentication, protecting you from accindental leaks and most XSS attacks.

The ZeroKit SDK for Web is currently under development and is accessible as a preview. We continuously improve it and fix bugs. Feedback is always welcome.

The project was written in typescript and is available compiled to javascript on the tenant server. Loading from there is the recommended way of use.

Usage

The SDK compiles into a bundle, which inserts the zkit_sdk object into the global namespace. Calling the setup method of this object initializes the sdk. This should be done during the pageload optionally along with a whoAmI call that will initialize the lazy loading. After the setup you can use the exposed methods to register and log users in or encrypt and decrypt your sensitive data.

You can see for yourself:

zkit_sdk.setup('https://host-hostId.tresorit.io', '/tenant-tenantId');
// After logging in...
zkit_sdk.createTresor().then(tresorId => {
  return zkit_sdk.encrypt('tresorId','Some sensitive data').then((encryptedText) => {
    // Now this text is only decryptable by people who you shared the above "tresor" with
    // You can transport it however you like, it wont leak..
    console.log(encryptedText);  
    return zkit_sdk.decrypt(encryptedText);
  }).then((plainText) => {
    // And we just got the original back...
    console.log(plainText);
    return zkit_sdk.shareTresor(tresorId, 'userIdB');
  }).then((oprationId) => {
    // If this operation is approved by the application server,
    // every text ever encrypted by this tresor is decryptable by userB...
    // No reencyption, no refreshing, everything handled by ZeroKit.
    return applicationServerCall(operationId);
  });
});
// That's how simple it is.

Go ahead to the management portal and find out more in the documentation and check the full set of features provided by ZeroKit!

Requirements

First, to use the SDK you need a tenant server (basically a subscription to ZeroKit). You can get one for free here, where you can also find a detailed documentation and sample apps for many platforms. You can also get the relevant example from GitHub.

Keywords

FAQs

Package last updated on 10 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc