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

crypty

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypty

Simple encryption and decryption.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Crypty

A super simple (but secure) encryption and decryption of text using aes-256-cbc algorithm with a 32 bytes secret.

Important

By design the hash doesn't change at every encryptation, so don't use this lib to encrypt passwords.

Build Status sponsored by Taller

Install

npm i crypty

or

yarn add crypty

Usage

import { encrypt, decrypt } from 'crypty'

// Your secret must have 32 bytes.
const secret = 'P10PJY1ckcMEeZxWHfVzsiOktuXf8O8O'

const hash = encrypt('my text', secret)
// => 46e2a7e3214f127c198247332cdc89ce

const text = decrypt(hash, secret)
// => 'my text'

Disclaimer

Based on node-crypto-examples from @chris-rock.

Keywords

crypto

FAQs

Package last updated on 08 Aug 2018

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