C#.Net中的BigInteger.probablePrime ??? [英] BigInteger.probablePrime in C#.Net???

查看:71
本文介绍了C#.Net中的BigInteger.probablePrime ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在VC#.Net 2.0中开发基于RSA加密的应用程序和

需要使用BigInteger.probablePrime() 。我知道VC#.Net 2.0

没有BigInteger类,但发现一个伙伴创建了

BigInteger类,但它缺少一些重载函数,如

BigInteger.probablePrime()。在C#.Net中开发的BigInteger类的代码可以在这里找到:
http://www.codeproject.com/KB/cs/biginteger.aspx


快速建议总是欢迎。

提前致谢。

Hi,

Im developing RSA cryptography based application in VC#.Net 2.0 and
need to use "BigInteger.probablePrime()". I know that VC#.Net 2.0
doesn''t have the BigInteger class but found that one buddy created
BigInteger class but it is missing some overloading function like
BigInteger.probablePrime(). The code of the BigInteger class developed
in the C#.Net can be found here:
http://www.codeproject.com/KB/cs/biginteger.aspx

Quick suggestions are always welcome.
Thanks in advance.

推荐答案

7月10日,2:10 * pm,imranisb< imran。 .. @ gmail.comwrote:
On Jul 10, 2:10*pm, imranisb <imran...@gmail.comwrote:




我在VC#.Net 2.0中开发基于RSA加密的应用程序

需要使用BigInteger.probablePrime()。我知道VC#.Net 2.0

没有BigInteger类,但发现一个伙伴创建了

BigInteger类,但它缺少一些重载函数,如

BigInteger.probablePrime()。在C#.Net中开发的BigInteger类的代码可以在这里找到: http://www.codeproject.com/KB/cs/biginteger.aspx



这样的方法到底应该是什么怎么做?

What, exactly, should such a method do?


如果你指的是那个名字的Java BigInteger类和方法,那么我认为

最简单的事情就是将该方法包装起来一个java控制台应用程序并运行它来自c#的
。我怀疑恭维c#中的方法是相当复杂的...


" imranisb"写道:
If you mean the Java BigInteger class and method by that name, then I think
the easiest thing is just wrap that method in a java console app and run it
from c#. I suspect implimenting that method in c# is fairly involved...

"imranisb" wrote:




我在VC#.Net 2.0和
$中开发基于RSA加密的应用程序b $ b需要使用BigInteger.probablePrime()。我知道VC#.Net 2.0

没有BigInteger类,但发现一个伙伴创建了

BigInteger类,但它缺少一些重载函数,如

BigInteger.probablePrime()。在C#.Net中开发的BigInteger类的代码可以在这里找到:
http://www.codeproject.com/KB/cs/biginteger.aspx


快速建议总是欢迎。

提前致谢。
Hi,

Im developing RSA cryptography based application in VC#.Net 2.0 and
need to use "BigInteger.probablePrime()". I know that VC#.Net 2.0
doesn''t have the BigInteger class but found that one buddy created
BigInteger class but it is missing some overloading function like
BigInteger.probablePrime(). The code of the BigInteger class developed
in the C#.Net can be found here:
http://www.codeproject.com/KB/cs/biginteger.aspx

Quick suggestions are always welcome.
Thanks in advance.


我为GNU GMP(大号)项目写了一个C#接口。它包括isPrime的

接口,它可以进行概率性的Miller / Rabin测试。你可以在 _blank> http://sites.google.com/site/fredm/H...terface-to-gmp

它使用C ++(dotNet)来创建类然后可以通过C#访问。


如果你不想使用它,我可以提供进行

测试的原生C#代码;它使用C#native类型(ulong,这是64位 - 可能不是大

足以满足您的需要)。该代码只有大约80行。


如果你想编写自己的函数,请在网上查找Miller-Rabin

看看它是怎么回事工作。

" imranisb" < im ****** @ gmail.com在留言中写道

新闻:17 ************************ ********** @ 59g2000h sb.googlegroups.com ...
I wrote a C# interface to GNU GMP (big Number) project. It includes an
interface to "isPrime", which does the probablistic Miller/Rabin test. You
can find it at http://sites.google.com/site/fredm/H...terface-to-gmp.
It uses C++ (dotNet) to make the classes which are then accessible via C#.

If you don''t want to use that, I can supply native C# code that does the
test; it uses C# native type (ulong, which is 64 bits -- might not be "big"
enough for your purposes). That code is only about 80 lines long.

If you want to write your own function, look up Miller-Rabin on the net to
see how it works.
"imranisb" <im******@gmail.comwrote in message
news:17**********************************@59g2000h sb.googlegroups.com...




我在VC#.Net 2.0和

中开发基于RSA加密的应用程序需要使用BigInteger.probablePrime()。我知道VC#.Net 2.0

没有BigInteger类,但发现一个伙伴创建了

BigInteger类,但它缺少一些重载函数,如

BigInteger.probablePrime()。在C#.Net中开发的BigInteger类的代码可以在这里找到:
http://www.codeproject.com/KB/cs/biginteger.aspx


快速建议总是欢迎。

提前致谢。
Hi,

Im developing RSA cryptography based application in VC#.Net 2.0 and
need to use "BigInteger.probablePrime()". I know that VC#.Net 2.0
doesn''t have the BigInteger class but found that one buddy created
BigInteger class but it is missing some overloading function like
BigInteger.probablePrime(). The code of the BigInteger class developed
in the C#.Net can be found here:
http://www.codeproject.com/KB/cs/biginteger.aspx

Quick suggestions are always welcome.
Thanks in advance.



这篇关于C#.Net中的BigInteger.probablePrime ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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