guedes-crypt
v1.0.2
Published
Library for string encryption in nodejs
Downloads
1
Readme
guedesCrypt
Library for string encryption in nodejs
guedesCrypt is a lightweight library for encryping strings in nodejs
Features
Encrypt your strings with a secret salt defined by you(Do not share this salt as it is the key to decrypt the string)
Decrypt your encrypted strings with the same salt. (Using a different salt from the encryption one will result in erronous strings)
Installation
guedesCrypt requires Node.js v10+ to run.
Install the dependencies and devDependencies and start the server.
cd [yourproject]
npm i guedes-crypt
Usage
To encrypt a String you need a secret salt to use in the guedesEncrypt function
let string = "This is the string I want to encrypt"
let salt = "THIS IS MY SECRET SALT"
let encryptedString = guedesEncrypt(salt,string);
// This will result in '407c7d67347d6734607c71346760667d7a73345d3463757a6034607b34717a77666d6460'
To decrypt a String you need the same secret salt used in its encryption as well as the encrypted string
let decryptedString= guedesDecrypt(salt,encryptedString );
// This will result in 'This is the string I want to encrypt'
License
MIT
Fuck you Rui