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

Encrypt filenames #48

Open
yoyixms opened this issue Mar 12, 2021 · 1 comment
Open

Encrypt filenames #48

yoyixms opened this issue Mar 12, 2021 · 1 comment

Comments

@yoyixms
Copy link

yoyixms commented Mar 12, 2021

Hi,
I was able to set a password using the compressor. but it seems it does not encrypt the file names. is this possible?

Thanks!

@getnamo
Copy link
Owner

getnamo commented Mar 12, 2021

At a glance, looks like 7zip com API needs -mhe option passed to encrypt archive header (ref https://www.cnx-software.com/2011/02/22/aes-256-encryption-and-file-names-encryption-with-7-zip-7z/), likely somewhere around

bool SevenZipCompressor::SetCompressionProperties(IUnknown* outArchive) const
or https://github.com/getnamo/7zip-cpp/blob/0cbebfbef54731db9df49baaa8adde38936eeed3/7zpp/ArchiveUpdateCallback.cpp needs to be modified to update archive with desired settings, I'm not 100% sure since it's been a while since I've looked at this.

That should hopefully get you started on how to modify source to add the feature.

NB:
These were the changes done by https://github.com/KocourKuba to add encryption support (661c0f2#diff-3087414f04c94500ca05e45e07d945c3a9df425ebd2f77de5e34e38ea4df95f5)

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

No branches or pull requests

2 participants