EncryptionProvider Example

Add-in Express™ Support Service
That's what is more important than anything else

EncryptionProvider Example
Where is the referenced example for EncryptionProvider? 
Andrew Bruce




Posts: 5
Joined: 2022-01-04
Hi Add-in Express folks,

In post Implementing Encryption Provider I saw a reference to a sample project which was provided directly to an Add-in Express end user.

I too must implement custom encrypt / decrypt and I am thrilled that Add-in Express might make this easier for me to do. If I could get this sample project I would appreciate it very much.

Best regards!
Andy
Posted 04 Jan, 2022 10:59:38 Top
Andrei Smolin


Add-in Express team


Posts: 18183
Joined: 2006-05-11
Hello Andy,

That may not be what you need. The EncryptionProvider COM interface is enigmatic. We don't know how to use it. To implement the interface, you add it to the declaration of your add-in module class and implement the methods described at https://docs.microsoft.com/en-us/office/vba/api/overview/library-reference/encryptionprovider-members-office.

public partial class AddinModule : AddinExpress.MSO.ADXAddinModule, Office.EncryptionProvider


I haven't found the sample project mentioned in that thread.

Later on, we replied to someone asking us about that interface:


But, as you mentioned, there is a total lack of documentation, and all our attempts to develop a working sample failed. We see that some methods of the EncryptionProvider interface are called but then a host application (Word or Excel) may crash.


This is all information that we have.

Regards from Poland (CET),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2022 13:04:19 Top
Andrew Bruce




Posts: 5
Joined: 2022-01-04
Hey Andrei! Well, I cobbled together a method to encrypt *and* auto-decrypt any Office document...without EncryptionProvider ;)

I'll write it up but let's just say it's kludgy at best. But...I can demo what I want.

I'll tackle EncryptionProvider interface for v0.2 effort - v0.1 uses a lot of windows iteration and loaded file handle analysis *and* OLE binary document loading / reading to get my initial result. Basically leveraging sysinternals and scanning system window handles for the appropriate Word / Excel / PowerPoint password windows (via classname which is fortunately unique). Ugly but not bad for 48 hours of work...will keep you informed on my experiments with EncryptionProvider when I get to it.
Posted 07 Jan, 2022 17:54:02 Top
Andrei Smolin


Add-in Express team


Posts: 18183
Joined: 2006-05-11
Hello Andrew,

Not bad? Actually, that's great!

Regards from Poland (CET),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jan, 2022 10:43:02 Top