Hi Ian Peterson,
Thanks for the clarification. The element you need to add password for editing is the p:modifyVerifier
. It needs to be added to the presentation.xml part and it should be an immediate child of the p:presentation
element and it must come before any extList
elements in the part. It should be similar to this:
<p:modifyVerifier cryptProviderType="rsaAES" cryptAlgorithmClass="hash" cryptAlgorithmType="typeAny" cryptAlgorithmSid="14" spinCount="100000" saltData="ZkNVQ370CHOj5dkCeIwdxQ==" hashData="gIJEhXtNejdlCNvTxQgppRNRgbEX5Hojrupnna1NLCI77wFVhDFHWZV2AOz/RMQi7aOUe9dzd8DOQdbNbR7Biw=="/>
Please note, however, this does not encrypt the file and can be easily undone by removing the element from the xml.
When a password protected document is created in the Office User Interface (UI) becomes a Microsoft Compound File Binary File Format (MS-CFB) document (not a ZIP package), though the file extension does not change (e.g., xlsx, docx, pptx). Subsequently, the UI protected document will open within the Office UI but you cannot rename the file extension to *.zip and browse it with Explorer.
This is not what happens when you add an element to the xml part. When you add the p:modifyVerifier
element to a pptx (or the other elements for docx and xlsx), PowerPoint (or Word or Excel) will require a password to open the pptx for editing, but it if a user edits the xml and removes the p:modifyVerifier
element then no password will be required for editing.
Best Regards,
Michael Bowen
Senior Escalation Engineer - Microsoft Open Specifications