简体   繁体   English

使用弹性城堡API在C#中创建PGP SDA

[英]Creating a PGP SDA in C# using the bouncy castle API

I'm currently writing an application to PGP encrypt files using the Bouncy Castle API (release 1.6.1) in C#. 我目前正在使用C#中的Bouncy Castle API(版本1.6.1)将应用程序编写为PGP加密文件。 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. 我已经设法使所有工作都使用公用/秘密密钥对和密码短语进行加密和解密,但是我的工作要求之一是还具有创建将文件加密为SDA的功能(自我解密档案)就像官方的PGP软件一样。

Anyone have any idea how this can be achieved? 有人知道如何实现吗?

Cheers 干杯

  1. 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. 编写一个轻量级版本,该版本除了验证密码,解密,显示漂亮的进度条并允许用户指定文件的目标位置外,什么也不做。

  2. 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. 启动此轻量级版本时,它将查找目标文件的内部资源集合,并根据上述顺序对其进行解密,然后将其写入目标目录。

  3. 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? 此处: 如何从C#代码更改可执行图标? (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/ . 要获得奖励积分,请将SDE标记为在下次重新引导时删除: http : //abhi.dcmembers.com/blog/2009/03/24/mark-file-for-deletion-on-reboot/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM