Socket
Socket
Sign inDemoInstall

json-encrypt

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    json-encrypt

Encrypt your JSON API


Version published
Maintainers
1
Install size
2.71 kB
Created

Readme

Source

Encrypt your JSON API page

HOW TO EASILY USE IT?

const je = require('json-encrypt')

To encrypt json data:

je.encrypt(json)

To decrypt json data:

je.decrypt(json_encrypted)

EXAMPLE

ENCRYPT JSON

var json = [
  {
    name:"Tegar Santosa",
    gender:"male"
  },
  {
    name:"Santi Puspa",
    gender:"female"
  },
]
console.log(je.encrypt(json))

Result:

0a979b1b4a2ff874a1e02a68e345f8bc7a8610dedd5f8d218443b94502942c93aa6656640ac79841998ee2efe41616b296cfa4b10cbf1bd891e41aaa113529f8424259792c97b2e442f7007c4bc1d68c742dc81c59b173310a7ee6bb2233a76e

DECRYPT JSON

console.log(je.decrypt(je.encrypt(json)))

OR

console.log(je.decrypt('0a979b1b4a2ff874a1e02a68e345f8bc7a8610dedd5f8d218443b94502942c93aa6656640ac79841998ee2efe41616b296cfa4b10cbf1bd891e41aaa113529f8424259792c97b2e442f7007c4bc1d68c742dc81c59b173310a7ee6bb2233a76e'))

Result:

[
  {
    name:"Tegar Santosa",
    gender:"male"
  },
  {
    name:"Santi Puspa",
    gender:"female"
  },
]

Keywords

FAQs

Last updated on 20 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc