jeudi 19 juillet 2018

Securing app access to a single document for free license

I have a document-based app and am trying to figure out how to securely restrict the user to creating, editing, and saving a single document. I will disable the built-in file browser and "Open" "Save As" file menu items, and alter the "New" file menu item to simply reset this single file that is allowed. The idea is for the app to simply open up the last saved state of that single allowed document and automatically save to the document from the "Save" action.

Does anyone have any idea how to do this securely? Simply storing a default file path in the app data dir will allow the user to simply move and replace the file to edit multiple documents. I can't think of a way to encrypt the file without exposing an encryption key in the app binary. Or maybe some combination of encryption and last time stamp to invalidate a file that is swapped out? I don't know.

Thoughts? Thanks!

-Patrick

Aucun commentaire:

Enregistrer un commentaire