ganlvtech / lua-simple-encrypt

Lua simple XOR encrypt
https://ganlvtech.github.io/lua-simple-encrypt/
MIT License
95 stars 67 forks source link

Multi Upload File #14

Open Tchaj opened 4 years ago

Tchaj commented 4 years ago

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

ganlvtech commented 4 years ago

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.

jrubimf commented 3 years ago

Can you do a better example?