An open API service indexing awesome lists of open source software.

https://github.com/phasehq/client-js-sdk

Encrypt data client side in JavaScript
https://github.com/phasehq/client-js-sdk

Last synced: 3 months ago
JSON representation

Encrypt data client side in JavaScript

Awesome Lists containing this project

README

          

# Javscript Client SDK for Phase

Phase SDK to encrypt data in client-side JavaScript applications

## Install

`npm i @phase.dev/phase-js` or `yarn add @phase.dev/phase-js`

## Import

```js
import Phase from "@phase.dev/phase-js";
```

## Initialize

Initialize the SDK with your `APP_ID`:

```js
const phase = new Phase(APP_ID);
```

## Usage

```js
const ciphertext = await phase.encrypt("hello world");
```

## Development

### Install dependencies

`npm install`

### Build

`npm run build`

### Run tests

`npm test`