nika-begiashvili / libarchivejs

Archive library for browsers
MIT License
288 stars 35 forks source link

can I extract a protected zip file (with password) #5

Closed landvibe closed 5 years ago

landvibe commented 5 years ago

.

nika-begiashvili commented 5 years ago

Unfortunately not, to bring decryption functionality from libarchive requires to compile openssl to webassembly and it will increase wasm file size as well. this is certainly possible but would make sense to introduce different wasm bundles

nika-begiashvili commented 5 years ago

Starting from 1.3.0 you can now extract password protected archives

Extract encrypted archive

    const archive = await Archive.open(file);
    await archive.usePassword("password");
    let obj = await archive.extractFiles();