How can I use bigint with C#?

后端 未结 5 1517
日久生厌
日久生厌 2020-12-09 20:44

I work to implement an RSA key algorithm. But I couldn\'t use a 2048-bit value. How I can use it?

I want to use big integer.

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 21:28

    Native support for big integers has been introduced in .NET 4.0. Just add an assembly reference to System.Numerics, add a using System.Numerics; declaration at the top of your code file, and you’re good to go. The type you’re after is BigInteger.

提交回复
热议问题