Reputation: 336
I'm currently writing an application to PGP encrypt files using the Bouncy Castle API (release 1.6.1) in C#. I've managed to get everything working in terms of encrypting and decrypting files using both public/secret key pairs and pass phrases, but one of the requirements of my work is also to create the ability to encrypt files into SDAs (Self Decrypting Archives) much like the official PGP software does.
Anyone have any idea how this can be achieved?
Cheers
Upvotes: 0
Views: 558
Reputation: 6297
Write a lightweight version that does nothing but verify the password, decipher, display a nice progress bar, and allow the user to specify the target location for the file.
When this light weight version launches, it looks to its internal resources collection for the target file, and deciphers according it to the sequence above, and then writes it to the target directory.
You write a version of your app which packages the virgin lightweight app with the target file. How do you do that? Here: How to change executable icon from c# code? (not my app icon).
For bonus points, mark the SDE for deletion on next reboot: http://abhi.dcmembers.com/blog/2009/03/24/mark-file-for-deletion-on-reboot/.
Upvotes: 1