New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

encrypted

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

encrypted

encrypted

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

MIT license

Encrypted, just some client side encryption helpers

npm install encrypted --save
import { encrypted, decrypted } from "encrypted";

const encryptedObject = encrypted({my: ['secret', 'object']}, {'password': 'my pass'});
console.log(encryptedObject); // store this in some database
//{
//    encryption: {
//      type: 'secretbox',
//      salt: '1Ng96y/+JIHW+PiDM+sxk9bnyBWt0aoV',
//      nonce: 'cwudxtH26BhEhGlvT2lcUGz74uBBeVzY',
//      scrypt: { N: 16384, r: 8, p: 1, dkLen: 32, interruptStep: 0 }
//    },
//    data: 'cwudxtH26BhEhGlvT2lcUGz74uBBeVzYUylw9jxZUZSuvksfeGvp1rHCJetE4UxA/X/Y0rhSlg=='
//}
const decryptedObject = decrypted(encryptedObject, {'password': 'my pass'});
console.log(decryptedObject);
// {my: ['secret', 'object']}

A convenience wrapper around:

Inspired by:

Keywords

tweetnacl

FAQs

Package last updated on 13 Sep 2020

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