AES256.encryptStreamFile()

Encrypt a streamfile with source path

Usage

Hover over inputs/exits for more info.

var AES256 = require('machinepack-aes256');


// Encrypt a streamfile with source path

AES256.encryptStreamFile({

path: 'file.txt',

secret: 'a secure phrase or password',

save: true,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Error: File not find.

errorFileNotFind: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

path required

a path

'file.txt'
secret required

a secure phrase

'a secure phrase or password'
save

a boolean, saving in the same folder

true

Exits

error

An unexpected error occurred.

errorFileNotFind

Error: File not find.

success

OK.