Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pon-task-file-encrypt

realglobe-Inc2Apache-2.01.0.4

Pon task to encrypt a file

Pon

readme

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.