secure-connection-module

1.0.2 • Public • Published

secure-connection-module

前後端加解密用模組。

Related Repo

Getting Started

Installation

# Installation
$ npm install

# testing
$ npm run test

Usage

// Init with RSA-1024 public key API
const connection = await Connection.getInstance(url);

// Base get/delete
const userData = await connection.get(url);

// post/put with partial encryption
let postBody = { Account: 'test' ,Password: 'test' };
let postOption = { encrypt: ['Password'] }; //option style same as axios
const response = await connection.post(url, postBody, postOption);

//ppost/put with fully encryption
let postBody = { Account: 'test' ,Password: 'test' };
let postOption = { encrypt: 'all' };  //option style same as axios
const response = await connection.post(url, postBody, postOption);

Building

  • using babel with babel-preset-minify
npm run dist

References

axios - 0.18.0
cryptico-js - 1.1.0

License

TODO

  • [ ] add code testing coverage report
  • [ ] add auto reporting after every test runs
  • [ ] add github stickers for coverage and contributors
  • [X] add build tools that could transform es6 to commonjs(to dist)

Readme

Keywords

none

Package Sidebar

Install

npm i secure-connection-module

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

29.6 kB

Total Files

15

Last publish

Collaborators

  • iamcxa