Skip to content

A key based password hashing algorithm (NPM Package) to encrypt & decrypt strings in NodeJS applications. Designed to hide strings from the client side. I just wanted to find out how the two-way hashing algorithms work behind the scene so I just made my little version of it but it is also used for security purposes now in my NodeJS applications …

License

Notifications You must be signed in to change notification settings

RuzgarAtaOzkan/Object-Encrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

object-encrypt

🚀 Quick start

1. Install Object Encrypt

The easiest way to integrate the Object-Encrypt SDK into your JavaScript project is through the npm module.

Install the package via npm:

npm install object-encrypt

2. Initialize Object-Encrypt

// OE stands for ObjectEncrypt
const OE = require('object-encrypt');

const mySecret = 'secret123';

// Create a key based on that secret password.
const key = OE.createKey(mySecret);
// Key should not be exposed to client side or any other third party which can be malicious.

// Encrypt that secret with the key
const encrypted = OE.encrypt(mySecret, key);

// Decrypt that encrypted secret with the same key
const decrypted = OE.decrypt(encrypted, key);

// A key is both for encrypting and decrypting a secret.

About

A key based password hashing algorithm (NPM Package) to encrypt & decrypt strings in NodeJS applications. Designed to hide strings from the client side. I just wanted to find out how the two-way hashing algorithms work behind the scene so I just made my little version of it but it is also used for security purposes now in my NodeJS applications …

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published