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 "verify_passwd" and "verify_integrity" option #46

Merged
merged 7 commits into from
Jun 29, 2020

Conversation

jeffli678
Copy link
Contributor

#45

@codecov-io
Copy link

Codecov Report

Merging #46 into master will decrease coverage by 1.93%.
The diff coverage is 55.4%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #46      +/-   ##
=========================================
- Coverage   86.64%   84.7%   -1.94%     
=========================================
  Files          13      13              
  Lines        1168    1223      +55     
=========================================
+ Hits         1012    1036      +24     
- Misses        156     187      +31
Impacted Files Coverage Δ
msoffcrypto/method/ecma376_standard.py 98.21% <100%> (ø) ⬆️
msoffcrypto/method/ecma376_agile.py 68.13% <51.92%> (-21.87%) ⬇️
msoffcrypto/format/ooxml.py 75.22% <57.89%> (-3.57%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36d1d0e...8785514. Read the comment docs.

@nolze
Copy link
Owner

nolze commented Feb 29, 2020

Thanks! Overall it looks good to me. I'll take time to review and suggest some minor changes within 1-2 weeks.
To put your name in the contributors page, please make sure that your commits are associated with your GitHub account.

@nolze nolze linked an issue Feb 29, 2020 that may be closed by this pull request
@nolze
Copy link
Owner

nolze commented Apr 7, 2020

Sorry for taking time to look into this; please wait a little while.

@jeffli678
Copy link
Contributor Author

Sorry for taking time to look into this; please wait a little while.

Never mind, please take your time!

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2020

Codecov Report

Merging #46 into master will increase coverage by 0.36%.
The diff coverage is 94.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   86.64%   87.00%   +0.36%     
==========================================
  Files          13       13              
  Lines        1168     1224      +56     
==========================================
+ Hits         1012     1065      +53     
- Misses        156      159       +3     
Impacted Files Coverage Δ
msoffcrypto/method/rc4_cryptoapi.py 95.23% <ø> (ø)
msoffcrypto/format/ooxml.py 79.64% <84.21%> (+0.85%) ⬆️
msoffcrypto/method/ecma376_agile.py 94.38% <98.07%> (+4.38%) ⬆️
msoffcrypto/method/ecma376_standard.py 98.18% <100.00%> (-0.04%) ⬇️
msoffcrypto/format/ppt97.py 98.62% <0.00%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36d1d0e...76e7700. Read the comment docs.

@nolze
Copy link
Owner

nolze commented Jun 14, 2020

Finally I'm happy to get ready to merge your PR.

I added some changes, especially to ecma376_agile.py. Please let me know if you find any problem. Some notes:

  • Did some rename
  • To keep crypto methods stateless, I decided not to share the result of hashing iteration in Agile between makekey_from_password and verify_password, but do once for each (this could be improved in future)
  • verify_password and verify_integrity is False by default for now, but could be True by default in 5.x. (with optimization)
  • Added some tests and looks fine

EDIT: To put your name in the contributors page, please match the email address added in your GitHub account and ones used in your commits.

@jeffli678
Copy link
Contributor Author

Your changes look nice to me. I will also check my email and let you know.

@jeffli678
Copy link
Contributor Author

I updated my email to the correct one. If you do not have other issues, please accept the PR.

To keep track of what I did:

  1. pull the remote to my local and resolve the merge conflicts. This brings you changes to my local.
  2. rebase -i, and then amend the email in my two commits.
  3. force push

I hope that I did it correctly. Interestingly GitHub updates the PR automatically so I do not need to file a new one.

@nolze nolze merged commit fd7f114 into nolze:master Jun 29, 2020
@nolze
Copy link
Owner

nolze commented Jun 29, 2020

Looks good to me. Thank you for your patience and cooperation!

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.

Verify if the key is correct and check the hmac of the payload
4 participants