pyminizip | To create a password encrypted zip file in python | Encryption library
kandi X-RAY | pyminizip Summary
kandi X-RAY | pyminizip Summary
To create a password encrypted zip file in python. And the zip file is able to extract in WINDOWS. This is a simple Minizip wrapper of python. (This software uses zlib. License: zlib/libpng License.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pyminizip
pyminizip Key Features
pyminizip Examples and Code Snippets
Community Discussions
Trending Discussions on pyminizip
QUESTION
I have 2 GB of data in memory (for example data = b'ab' * 1000000000
) that I would like to write in a encrypted ZIP or 7Z file.
How to do this without writing data
to a temporary on-disk file?
Is it possible with only Python built-in tools (+ optionally 7z)?
I've already looked at this:
ZipFile.writestr
writes from a in-memory string/bytes which is good but:ZipFile.setpassword
: only for read, and not writeHow to create an encrypted ZIP file? : most answers use a file as input (and cannot work with in-memory data), especially the solutions with
...pyminizip
and those with:
ANSWER
Answered 2022-Mar-18 at 06:35It would probably be simplest to use third-party applications such as RadeonRAMDisk to emulate disk operations in-memory, but you stated you prefer not to. Another possibility is to extend PyFilesystem to allow encrypted zip-file operations on a memory filesystem.
QUESTION
I am using Python to create a list of groups. It only makes sense to me that, using the code, I have for creating the password protected zip, I can create the input in my code as long as it is created before listing the input. As such, I have created a txt file which then needs to be placed in a password protected zip. With the code I am using below, I get this error message when I try to run it: (OSError: error in opening /Users/name/Desktop/Groups.txt for reading). I'm simply not very experienced in this regard and wouldn't know how to solve this issue (+ I am extremely desperate right now). This is the code I have so far, but it does not work:
...ANSWER
Answered 2022-Feb-28 at 07:42The input file might be in a different directory, because of which there's an error. You can either
- Set
inpt = "Groups.txt"
- Set
with open("/Users/name/Desktop/Groups.txt", 'w') as file:
QUESTION
I am trying to password protect my zip file(with multiple txt files) using pyminizip.commpress_multiple
...ANSWER
Answered 2021-May-01 at 04:39The reason for not asking password second time is because when you right-click on "Extract files"
then Windows remembers password after you first entering it. So second time Windows automatically uses remembered password.
Windows always tries to remember different kind of information for use, not to bother user extra time.
In this case Windows remembers password only by full path of this zip file. You can try moving file to a different folder, or renaming file, or even renaming folder that this file is contained in. In all cases Windows will ask for the password again.
Also Windows remembers password only for some time, definitely if you reboot Windows then it will forget and ask password again.
I tried reproducing your problem on my Windows and it acted totally same on my machine, I created archive with your Python code and then Extract files
didn't ask for password on second try.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pyminizip
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page