-
Notifications
You must be signed in to change notification settings - Fork 58
Utility to get an Office compatible hash of a password #15
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
Conversation
Unit tests did not properly tests that both adapters had the exact same behavior for returned values. By using common code for testing we can assert that the behavior is now in fact identical. Also phpdocs were moved to the interface itself instead of each adapters.
…into add_password_hash
@Progi1984 what do you think? Did you manage to integrate this in PhpSpreadsheet or is it not reusable? I'd like to add this feature in the next PhpWord version and I need to know if I should implement it in PhpWord or use the common lib. |
@troosan For the integration in PhpSpreasheet, I think you should ask to @PowerKiKi . In my case, If I can, I will integrate it in PhpPresentation :) |
I don't have immediate plan to integrate that in PhpSpreadsheet, but that doesn't change much. I think it would have its place in Common. |
@@ -0,0 +1,224 @@ | |||
<?php | |||
/** | |||
* This file is part of PHPWord - A pure PHP library for reading and writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@troosan May be changing the part of ? :)
/** | ||
* Test that the encoder falls back on SHA-1 if a non supported algorithm is given | ||
*/ | ||
public function testDafaultsToSha1IfUnsupportedAlgorithm() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dafaults ? Defaults ?
Implementation based on https://blogs.msdn.microsoft.com/vsod/2010/04/05/how-to-set-the-editing-restrictions-in-word-using-open-xml-sdk-2-0
done by @mariahaubner in PHPWord, but I thought this would be the correct place to put it.