You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

fine-crypt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fine-crypt

simple encrypt/decrypt library

1.0.5
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Simple encode/decode library, initially intended for database id's obfuscation

Usage

const Cryptor = require('fine-crypt');

// create secret word
const secret = 'top_secret_word';

// create a new cryptor object
const cryptor = new Cryptor(secret);

// select a text or id for encryption
// encrypted text should contain only UTF-16 characters
// with codes between 33 and 1023
// e.g. latin letters, digits and basic punctuation marks
const initText = '3 Men in a Boat (To Say Nothing of the Dog),';

// encrypt the text, encrypted text is a Base36 string
const encryptedText = cryptor.encrypt(initText);
// or you can redefine the secret word:
const encryptedText = cryptor.encrypt(initText, secret);

// decrypt the text
const decryptedText = cryptor.decrypt(encryptedText);
// or you can redefine the secret word
const decryptedText = cryptor.decrypt(encryptedText, secret);

Install

$ npm install fine-crypt

License

ISC

Keywords

crypto

FAQs

Package last updated on 30 Mar 2021

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