@dotsenkodanylo/quick-encrypt

1.1.4 • Public • Published

Quick En-Crypt

Small package dependent on Tweetnacl encryption library that streamlines some encryption/decryption for a few JS-centric data types.

Examples:

fs.readFile('file.bin', function (err, data) {
    // Decode the buffer returned by the `readFile` method. 
    let decrypted = decryptJson(data, key);

    // Pass the decrypted encoding to a new Buffer. 
    let buffer = Buffer.from(decrypted);

    // Create file with the encoding. 
    fs.writeFileSync('assets/file.txt', buffer, function (err) {
       console.log('Success!');
    });
});

Package Sidebar

Install

npm i @dotsenkodanylo/quick-encrypt

Weekly Downloads

0

Version

1.1.4

License

ISC

Unpacked Size

4.09 kB

Total Files

3

Last publish

Collaborators

  • dotsenkodanylo