confi-coder
v1.0.1
Published
## description
Downloads
2
Readme
confi-coder
description
confidential file encoder and decoder with MD5 and bitwise encription method.
usage
- Node Module
configure CODER_KEY
, default ENCODED_PATH
and default DECODED_PATH
within ./src/config.js
const { encode, decode } = require("confi-coder/src/coder.js");
decode(); // or decode(fromPath, toPath);
encode(); // or encode(fromPath, toPath);
- Cli
configure CODER_KEY
, default ENCODED_PATH
and default DECODED_PATH
within ./src/config.js
npm run decode
# or `npm run decode from=... to=...`
npm run encode
# or `npm run encode from=... to=...`
set CODER_KEY
:
# Unix shell:
CODER_KEY=... npm run decode
# Win32:
set CODER_KEY=... & npm run decode
Note
ENCODED_PATH
: the encoded file path. default should be inlib
, which will be checked in githubDECODED_PATH
: the decoded file path. default should be indist
, which will be ignored by githubCODER_KEY
: the priority ofCODER_KEY
: explicit key >process.env
>config.KEY
example
clone the project, and run
npm run decode
check the dist/concise.html
test
npm test