fcrypt

1.1.2 • Public • Published

fcrypt

v1.1.1 ( last update: 27 may 2017 )

Encryption and decryption files and folders.

Install

npm i fcrypt --save-dev

Node.js

var fcrypt = require("fcrypt");

Encrypt

fcrypt.encrypt({
  key: "mySuperPass1337",
  input: "./src/private",
  output: "./src/dest/private.data",
  callback: (errors) => {
    if (errors.exists) {
      errors.console();
      return;
    }
    console.log("encrypted");
  }
});

Decrypt

fcrypt.decrypt({
  key: "mySuperPass1337",
  input: "./src/dest/private.data",
  output: "./src/output",
  callback: (errors) => {
    if (errors.exists) {
      errors.console();
      return;
    }
    console.log("decrypted");
  }
});

Extra

You could change default crypto method

fcrypt.encrypt({
  key: "mySuperPass1337",
  input: "./private",
  output: "./dest/private.data",
  method: "aes192", // <-- The one
  callback: () => {
    console.log("encrypted");
  }
});

Same thing in decrypt()

Package Sidebar

Install

npm i fcrypt

Weekly Downloads

2

Version

1.1.2

License

MIT

Unpacked Size

121 kB

Total Files

12

Last publish

Collaborators

  • lidebug