1.0.4 • Published 7 years ago

pon-task-file-encrypt v1.0.4

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

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

ParamtypeDescription
srcstringSource file path
deststringDestination file path
keystringSecret key string
optionsObjectOptional settings

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

encrypt task

ParamtypeDescription
srcstringSource file path
deststringDestination file path
keystringSecret key string
optionsObjectOptional settings

License

This software is released under the Apache-2.0 License.

Links

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago