Skip to content

sannjayy/node-encrypter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-encrypter

npm simple module to easily encrypt and decrypt strings & passwords.

GitHub Repo: https://github.com/sannjayy/node-encrypter

This module does not have any third-party dependencies.

Install using npm / yarn

npm install node-encrypter

yarn add node-encrypter

Example usage encrypt and decrypt

var Encrypter = require('node-encrypter');

const secretKey = "<YOUR-SECRET-KEY>";
const encrypter = new Encrypter(secretKey);

const clearText = 'sanjaysikdar.dev';
const encryptedText = encrypter.encrypt(clearText);

const decryptedText = encrypter.decrypt(encryptedText);

Advanced options

const secretKey = "<YOUR-SECRET-KEY>";
const algorithm = 'aes256';
const saltKeyLength = 32;
const digest = 'hex';

const encrypter = new Encrypter(secretKey, algorithm, saltKeyLength, digest);
  • secretKey - secret string key used for encryption.
  • algorithm - cipher Algorithm (default: aes256).
  • saltKeyLength - length of salt key (default: 32).
  • digest - message digest algorithm (default: hex).


Developed by Sanjay Sikdar.

License

The Node Encrypter is open-sourced software licensed under the MIT license.

About

Node Simple Encrypter Module for Encrypt and Decrypt Strings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published