Skip to content

Add password support - #1

Open
MohamedAshref371 wants to merge 4 commits into
ghuls:masterfrom
MohamedAshref371:feature/password-support
Open

MohamedAshref371 wants to merge 4 commits into
ghuls:masterfrom
MohamedAshref371:feature/password-support

Conversation

@MohamedAshref371

@MohamedAshref371 MohamedAshref371 commented Aug 26, 2026

Copy link
Copy Markdown

Password Parameter Handling

During testing and reviewing the internal code, it was confirmed that passing null as the password is handled correctly in both cases:

SevenZip.openInArchive in open method

Based on the internal code, it appears that passing the password as null will automatically call the method that does not have a password parameter.

item.extractSlow in getFile method

Testing showed that there is no issue with passing the password parameter as null. It is handled the same way as calling item.extractSlow without passing the password parameter.

Therefore, passing null as the password is safe and does not require separate handling in these cases.

@MohamedAshref371

MohamedAshref371 commented Aug 27, 2026

Copy link
Copy Markdown
Author

I tested it on the following archives:

1- ZIP archive without a password.
2- 7Z archive without a password.
3- ZIP archive with a password.
4- RAR5 archive with a password.
5- RAR5 archive with encrypted filenames.
6- 7Z archive with encrypted filenames.

Password: 123

@MohamedAshref371

Copy link
Copy Markdown
Author

Separated the extractSlow call to explicitly handle the password and non-password cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant