简体   繁体   中英

Can I use a digital signature in this scenario? With c#

I want to sign an xml document using a private key. And then when my client receives the software for them to be able to verify that the xml document hasnt changed by using a public key.

I want to distribut the same public key amongst all of my customers so that we can issue licenses to them.

Is this possible? I am using c# and .net.

Yes it is perfectly possible. Here is a comprehensive overview: How to: Verify the Digital Signatures of XML Documents with .NET

Also here is how to sign documents for later verification: In C#, sign an xml with a x.509 certificate and check the signature

Yes, this is possible. There are more important questions when putting together a solution.

  • Do you want this verification to be done automatically by your program?
  • Do you want to set up your own public key infrastructure?
  • Does your company already have a public signing certificate?

Depending on the answers, you might not need to write any code.

这里还有一篇很好的文章,介绍使用XML数字签名的许可证: http : //www.codeproject.com/KB/security/xmldsiglic.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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