Generate a password protected ZIP file in node.js

前端 未结 4 955
长情又很酷
长情又很酷 2021-01-17 16:15

I need to create a ZIP file in node.js, protected by a password.

I am using \"node-zip\" module, that unfortunately doesn\'t support password protection:

<         


        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-17 17:01

    I had the same issue and couldn't find the package to do it, so I've written one on my own, as a plugin to archiver package. Pure JS, no external zip software needed.

    Here it is - https://www.npmjs.com/package/archiver-zip-encrypted. Supports both legacy Zip 2.0 encryption and AES-256 encryption from WinZip.

提交回复
热议问题