使用PGP加密和数字签名文本文件 [英] Encrypt and digitally Sign a text file using PGP
本文介绍了使用PGP加密和数字签名文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有
i正在开发一个winform应用程序,我必须对文件执行以下操作,然后将其上传到ftp服务器上。
操作:
首先使用客户端发送的PGP密钥(公共密钥)加密文本文件。
第二次添加数字签名。
我怎么能得到它?
请帮帮我
Dear All
i am working on a winform aplication where i have to perform the followings actions on a File and then upload it on a ftp server.
actions:
First encrypt a text file using PGP Key (Public) sent by the client.
Second add the digital signature to it .
How can i get that?
Please help me out
推荐答案
这个简短的CodeProject文章详细解释了加密方案:使用C#进行PGP加密 [ ^ ]。
有些背景,请参阅:
http://en.wikipedia .org / wiki / Pretty_Good_Privacy [ ^ ],
http:// en。 wikipedia.org/wiki/Cryptographic_hash_function [ ^ ],
http://en.wikipedia.org/wiki/Data_compression [ ^ ],
http://en.wikipedia.org/wiki/Symmetric-key_cryptography [ ^ ],
http://en.wikipedia.org/wiki/Public-key_cryptography [ ^ ]。
但是,我不确定你是否需要使用PGP而不是别的。您可以通过直接使用.NETSystem.Security.Cryptography
来实现您可能需要的所有加密方案:
http://msdn.microsoft.com/en-us/library/System。 Security.Cryptography%28v = vs.110%29.aspx [ ^ ]。
这部分.NET BCL全面为您提供访问您可能需要的大多数(如果不是全部)算法。
-SA
This short CodeProject article explains the encryption scenarios in sufficient detail: PGP Encryption with C#[^].
For some background, please see:
http://en.wikipedia.org/wiki/Pretty_Good_Privacy[^],
http://en.wikipedia.org/wiki/Cryptographic_hash_function[^],
http://en.wikipedia.org/wiki/Data_compression[^],
http://en.wikipedia.org/wiki/Symmetric-key_cryptography[^],
http://en.wikipedia.org/wiki/Public-key_cryptography[^].
However, I am not sure that you need to use PGP and nothing else. You can always implement all cryptographic scenarios you might possibly need by direct use of .NETSystem.Security.Cryptography
:
http://msdn.microsoft.com/en-us/library/System.Security.Cryptography%28v=vs.110%29.aspx[^].
This part of .NET BCL comprehensively offers you the access to most, if not all, of the algorithms you may possibly need.
—SA
这篇关于使用PGP加密和数字签名文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文