Socket
Socket
Sign inDemoInstall

fine-crypt

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fine-crypt

simple encrypt/decrypt library


Version published
Weekly downloads
7
increased by16.67%
Maintainers
1
Install size
4.31 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 30 Mar 2021

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