rekrypt

1.0.1 • Public • Published

Banner Image

Installation

NPM:

npm i rekrypt --save

Documentation

Basic Usage

//Import Rekrypt
const rekrypt = require('rekrypt');
 
//Basic Encryption
//Encrypt takes 3 arguments. 2 of which are optional:
//encrypt('String', 'Key', Timestamp)
var encrypted = rekrypt.encrypt('Hello World!');
//This returns ['Encrypted String', 'key', Timestamp]
 
//Basic Decryption
//Decrypt takes the same arguments as encrypt
//But the string is the one we want to decrypt.
var decrypted = rekrypt.decrypt(encrypted[0],encrypted[1]);
//Here encrypted[0] is the encrypted string
//And encrypted[1] is the key used to decrypt the message.
 
console.log(`Encrypted Array: ${encrypted}`);
console.log(`Decrypted String: ${decrypted}`);

Syntax

encrypt( "String To Encrypt", "Optional Key", Optional Timestamp );
Returns ["Encrypted String", "Encryption Key Used", Timestamp]
decrypt( "String To Decrypt", "Encryption Key", Optional Timestamp );
Returns "Decrypted String"
makekey( length );
Returns "Base64 String"

Readme

Keywords

Package Sidebar

Install

npm i rekrypt

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • rekkyrek