Using encrypted xml as data source

B

Bob Kimbrough

I have a need to store product and pricing information on the local hard
drive as XML. The user selects products to generate a sales receipt. The
data should be encrypted using DPAPI, so neither the user nor a thief can see
or change the data. However, how do I make it available to InfoPath?

Can InfoPath perform on-demand decryption?
Can InfoPath call a custom assembly to decrypt the data when the form
launches and hold it in memory for use? If so, how do I assign this data
into InfoPath instead of using the local XML files directly?
 
B

Ben Walters

Hey Bob,
Your best bet to achieve this type of functionality is to add managed code
to your form. This code would open the XML file decrypt it get the value you
need then close the file.
Another option is to capture the save event of the InfoPath form and encrypt
the data when the form is saved out to the file system, you would also
capture the onload event to decrypt the data when the form is loaded.
However adding code to do this means that your form will need to be fully
trusted on the client machine.

Hope ths helps

Cheers
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top