ganlvtech/lua-simple-encrypt

Multi Upload File

Opened this issue · 2 comments

Tchaj commented

Hello,
How to multiupload file and encrypt all files and download all files in zip.
Thank You

It's a little difficult to do this in a browser. Because code are writen in js and encryption is done on your computer. There is no server.

If you have node.js installed. You can download this project. Run npm install

And replace index.js with some code like

import fs from 'fs';
import luaSimpleXorEncrypt from './LuaSimpleXorEncrypt';

// You need to repeat these lines to encrypt multiple files.
const encrypted = luaSimpleXorEncrypt(fs.readFileSync(path), 'password', options);
fs.writeFileSync(newPath, encrypted);

and then add target: 'node', to webpack.config.js.

Finally, run npm run build. You will let index.js run.

Can you do a better example?