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

Add encryption support for OOXML #86

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Add encryption support for OOXML #86

merged 4 commits into from
Jan 18, 2024

Conversation

stephane-rouleau
Copy link
Contributor

This is a port of the C++ library https://github.com/herumi/msoffice to add native Python support for encryption.

OLE file writing had to be ported over as olefile does not do the heavy lifting at this stage.

I have a few more tests I'd like to run, especially with larger files, but I wanted to get your feedback on this initial stab at it.

@nolze
Copy link
Owner

nolze commented Jan 14, 2024

So amazing! This is monumental work.
Basically everything seems fine, but let me take some time to review it.
I hope to merge this with minimal changes, and do more careful preparation for a new release afterwards.

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (57cae1c) 92.00% compared to head (5cd2ee1) 92.24%.
Report is 4 commits behind head on master.

Files Patch % Lines
msoffcrypto/method/container/ecma376_encrypted.py 91.78% 28 Missing ⚠️
msoffcrypto/method/ecma376_agile.py 97.10% 4 Missing ⚠️
msoffcrypto/format/ooxml.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   92.00%   92.24%   +0.23%     
==========================================
  Files          14       15       +1     
  Lines        1364     1843     +479     
==========================================
+ Hits         1255     1700     +445     
- Misses        109      143      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nolze
Copy link
Owner

nolze commented Jan 16, 2024

I made and commited some small edits, including:

  • Update LICENSE.txt to include the text for herumi/msoffice (BSD-3)
  • Run formatter (black)
  • Change some function names to the snake case from the camel case
  • Edit comments
  • Edit README

Diff: https://github.com/stephane-rouleau/msoffcrypto-tool/compare/03ea21f...5cd2ee1?diff=split&w=

Any feedback would be appreciated. I will merge this if there seems no problem.

@stephane-rouleau
Copy link
Contributor Author

Thank you so much for this, I will review soon and let you know!

@stephane-rouleau
Copy link
Contributor Author

It looks good to me, thank you for the cleanup!

@nolze nolze merged commit 7412cc4 into nolze:master Jan 18, 2024
16 checks passed
@nolze
Copy link
Owner

nolze commented Jan 18, 2024

Merged, thanks a lot!

@nolze nolze mentioned this pull request Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants