npm.io
1.0.4 • Published 9 years ago

pon-task-file-encrypt

Licence
Apache-2.0
Version
1.0.4
Deps
1
Vulns
0
Weekly
0

pon-task-file-encrypt

Build Status npm Version JS Standard

Pon task to encrypt a file

Installation

$ npm install pon-task-file-encrypt --save

Usage

'use strict'

const pon = require('pon')
const { encrypt, decrypt } = require('pon-task-file-encrypt')

;(async () => {
  let run = pon({
    encrypt: encrypt('secret.json', 'secret.json.enc', 'password123'),
    decrypt: decrypt('secret.json.enc', 'secret.json', 'password123')
  })

  run('encrypt')
}).catch((err) => console.error(err))

Signatures

decrypt(src, dest, key, options) -> function

decrypt task

Param type Description
src string Source file path
dest string Destination file path
key string Secret key string
options Object Optional settings
encrypt(src, dest, key, options) -> function

encrypt task

Param type Description
src string Source file path
dest string Destination file path
key string Secret key string
options Object Optional settings

License

This software is released under the Apache-2.0 License.

Keywords