pon-task-file-encrypt

1.0.4 • Public • Published

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.

Links

Readme

Keywords

Package Sidebar

Install

npm i pon-task-file-encrypt

Weekly Downloads

1

Version

1.0.4

License

Apache-2.0

Last publish

Collaborators

  • realglobe