fcrypt
1.1.2 • Public • Published fcrypt
v1.1.1 ( last update: 27 may 2017 )
Encryption and decryption files and folders.
Install
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",
callback: () => {
console.log("encrypted");
}
});
Same thing in decrypt()
Package Sidebar
Install
Weekly Downloads