Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

rekrypt

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rekrypt

I'm not an encryption expert. Don't use this for anything for release. It's just for fun :)

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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"

Keywords

Encryption

FAQs

Package last updated on 06 Feb 2017

Did you know?

Socket

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