本文介绍了使用RSA参数签署文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在C#上询问有关RSA登录的问题。



我有一个文件的标志。我有模数,私有指数和公共指数的普通十六进制值。我不想用随机生成的密钥签名。当我尝试用符号工具签名时,我得到了完美的结果。但我不能用C#来做。我是这类问题的新手。所以我真的被困了。



我看了很多网站和arcticles但我找不到任何解决方案。也许有但我无法得到它,我不知道。



如果你能向我解释一下细节(步骤),我会真的不胜感激。



非常感谢。



我的尝试:



我尝试了很多来自互联网的解决方案,但它无法正常工作。

Hello everyone,

I wanna ask question about RSA sign on C#.

I have one document for sign. I have plain hex values of modulus, private exponent and public exponent. I dont' t want to signing with random generated keys. When I try with sign with sign tool, i have got result perfectly. But i can' t do it with C#. I am new for this kind of problem. So i am really stucked.

I looked a lot of sites and arcticles but i couldn't find any solution. Maybe there is but i can' t get it, i don' t know.

If you could explain to me with details(step-step), i will really be grateful.

Thanks a lot.

What I have tried:

I tried a lots of solutions from internet but, its couldn't work.

推荐答案

RSAParameters parameters = new RSAParameters
{
    D = ...,
    DP = ...,
    ....
};
using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
{
    rsa.ImportParameters(parameters);
    // rest of your code; read the RSACryptoServiceProvider documentation to see what you can do with it; I believe you're interested in the 'SignData' method
}


这篇关于使用RSA参数签署文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 18:18