Skip to content

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

Merged
merged 16 commits into from
May 24, 2018
Merged

Utility to get an Office compatible hash of a password #15

merged 16 commits into from
May 24, 2018

Conversation

troosan
Copy link
Contributor

@troosan troosan commented Nov 24, 2017

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.

PowerKiKi and others added 6 commits November 25, 2017 01:08
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.
@Progi1984 Progi1984 self-requested a review November 27, 2017 07:39
@troosan
Copy link
Contributor Author

troosan commented Dec 13, 2017

@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.

@Progi1984
Copy link
Member

@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 :)

@PowerKiKi
Copy link
Member

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
Copy link
Member

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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dafaults ? Defaults ?

@Progi1984 Progi1984 merged commit d489595 into PHPOffice:develop May 24, 2018
@Progi1984 Progi1984 mentioned this pull request Jul 12, 2018
@troosan troosan deleted the add_password_hash branch July 13, 2018 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants