Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for password-protected .zip files.
To use: mount a .zip file as usual, open a file as usual, but append '$' plus the password to the end of the path, like so: PHYSFS_File *f = PHYSFS_openRead("/path/to/my/file.txt$MyPassword"); Note that this is the "traditional" PKWARE crypto, like you might get from PkZip 2.04g or Info-ZIP. They have more advanced cryptography in the modern .zip spec, but that's not implemented here. If you've ever tried to unzip an archive and were prompted for a password, you probably saw the traditional crypto at work. Note that this is NOT a secure thing: if you ship an app that contains a password, someone with a debugger can retrieve it. Note also that this password could be available to any code registered as a PHYSFS_Archiver, and that due to how archives combine into a single file tree, the wrong archiver can get the password, at a minimum causing it to fail because passwords don't match. In short: make sure you know what you're doing before you use this!
- Loading branch information
Showing
3 changed files
with
160 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters