Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to distinguish a file in archive is encrypted but not compressed? #324

Open
idle-ape opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@idle-ape
Copy link

idle-ape commented Feb 17, 2025

As described in the README.md, SevenZip cannot throw an error if the archive is encrypted but not compressed. It recommends that users extract a file and check the CRC32 to detect the password. Is there any way to distinguish if a file in the archive is encrypted but not compressed?

@bodgit bodgit added the question Further information is requested label Feb 18, 2025
@bodgit bodgit self-assigned this Feb 18, 2025
@bodgit
Copy link
Owner

bodgit commented Feb 20, 2025

In a word, no, not currently.

Checking the CRC32 can be efficiently done on the fly with neglible overhead using an io.TeeReader when extracting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants