如何在C#中获取Windows应用程序中的签名 [英] How Do I Get A Signature In Windows Application At C#

查看:600
本文介绍了如何在C#中获取Windows应用程序中的签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Windows应用程序。在该应用程序中,我想开发一个签名选项。在该选项中,用户必须在mouse的帮助下进行签名。后来我想在文本框中显示该签名。

I'm developing windows application.In that application i want to develop a signature option.In that option user has to sign with the help of mouse.Later i want to display that signature in textbox.

推荐答案

请参阅我对该问题的评论。总的来说,这篇文章没什么意义。

但我也可以给你正式答案:你的签名不是文字,所以无法显示 TextBox ,这是一个设计用于仅显示文本数据的控件。



顺便提一下,询问有关 TextBox 并不意味着什么。我会问你:TextBox?哪一个?全名字,请。始终提供完整的类型名称;在不同的UI库中有不同的不相关类型,简单名称为TextBox。



-SA
Please see my comment to the question. Overall, this post makes very little sense.
But I can also give you my formal answer: your "signature" is not text, so it cannot be shown TextBox, which is a control designed to show only text data.

By the way, asking any question about TextBox does not mean anything certain. I would ask you: "TextBox? Which one? Full type name, please". Always provide a full type name; there are different unrelated types with simple name "TextBox", in different UI libraries.

—SA


Divakard3问:
Divakard3 asked:

嘿,你能帮忙解决数字签名吗。

Hey can you help about digital signature.

首先,你需要了解它的作用:

http://en.wikipedia.org/wiki/Digital_signature [ ^ ]。



该想法基于公钥加密。解释它需要相当长的时间并需要付出一些努力,因此请更好地阅读并考虑它: http://en.wikipedia。 org / wiki / Public-key_cryptography [ ^ ]。



基本上,这是加密的反转:使用公钥,任何人都可以阅读文档但不能伪造它,因为写作需要私钥,这是没有通过任何地方然而,与加密相比,保护方案需要更复杂,因为您还应该保护整个事物是伪造的,密钥对和文档的情况,因此还应该能够检查公钥是否是原始的。解决此问题的方法之一是使用身份证书。请阅读上面引用的文章,另请参阅:

http://en.wikipedia.org/ wiki / Public_key_certificate [ ^ ],

http://en.wikipedia.org/wiki/Certificate_authority [ ^ ]。



首先,你需要了解所有这些背后的逻辑。现在,实现怎么样?

一切都已经由.NET BCL提供: http://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx [ ^ ]。



-SA

First of all, you need to understand what it does:
http://en.wikipedia.org/wiki/Digital_signature[^].

The idea is based on public-key cryptography. Explaining it would take considerable time and takes some effort, so better read it and think about it: http://en.wikipedia.org/wiki/Public-key_cryptography[^].

Basically, this it the inversion of encryption: with public key, anyone can read the document but cannot fake it, as writing would require a private key which is not passed anywhere. The protection scheme, however, need more sophistication compared to the encryption, because you should also protect from the cases when the whole thing is forged, key pair and the document, so one also should be able to check that the public key is original. One of the ways to overcome this problem is the use of identity certificates. Read about it in the article referenced above, see also:
http://en.wikipedia.org/wiki/Public_key_certificate[^],
http://en.wikipedia.org/wiki/Certificate_authority[^].

First of all, you need to understand the logic behind all that. Now, what about implementations?
Everything is already provided by .NET BCL: http://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx[^].

—SA


这篇关于如何在C#中获取Windows应用程序中的签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆