本文整理汇总了C#中BitcoinKit.BouncyCastle.Math.BigInteger类的典型用法代码示例。如果您正苦于以下问题:C# BigInteger类的具体用法?C# BigInteger怎么用?C# BigInteger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BigInteger类属于BitcoinKit.BouncyCastle.Math命名空间,在下文中一共展示了BigInteger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RsaBlindingParameters
public RsaBlindingParameters(
RsaKeyParameters publicKey,
BigInteger blindingFactor)
{
if (publicKey.IsPrivate)
throw new ArgumentException("RSA parameters should be for a public key");
this.publicKey = publicKey;
this.blindingFactor = blindingFactor;
}
示例2: DHParameters
public DHParameters(
BigInteger p,
BigInteger g,
BigInteger q)
: this(p, g, q, 0)
{
}
示例3: DsaParameters
public DsaParameters(
BigInteger p,
BigInteger q,
BigInteger g)
: this(p, q, g, null)
{
}
示例4: ECDomainParameters
public ECDomainParameters(
ECCurve curve,
ECPoint g,
BigInteger n)
: this(curve, g, n, BigInteger.One)
{
}
示例5: IssuerAndSerialNumber
public IssuerAndSerialNumber(
X509Name name,
BigInteger certSerialNumber)
{
this.name = name;
this.certSerialNumber = new DerInteger(certSerialNumber);
}
示例6: X9ECParameters
public X9ECParameters(
ECCurve curve,
ECPoint g,
BigInteger n)
: this(curve, g, n, BigInteger.One, null)
{
}
示例7: RsaPrivateCrtKeyParameters
public RsaPrivateCrtKeyParameters(
BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger p,
BigInteger q,
BigInteger dP,
BigInteger dQ,
BigInteger qInv)
: base(true, modulus, privateExponent)
{
ValidateValue(publicExponent, "publicExponent", "exponent");
ValidateValue(p, "p", "P value");
ValidateValue(q, "q", "Q value");
ValidateValue(dP, "dP", "DP value");
ValidateValue(dQ, "dQ", "DQ value");
ValidateValue(qInv, "qInv", "InverseQ value");
this.e = publicExponent;
this.p = p;
this.q = q;
this.dP = dP;
this.dQ = dQ;
this.qInv = qInv;
}
示例8: NaccacheSternKeyParameters
/**
* @param privateKey
*/
public NaccacheSternKeyParameters(bool privateKey, BigInteger g, BigInteger n, int lowerSigmaBound)
: base(privateKey)
{
this.g = g;
this.n = n;
this.lowerSigmaBound = lowerSigmaBound;
}
示例9: ElGamalParameter
public ElGamalParameter(
BigInteger p,
BigInteger g)
{
this.p = new DerInteger(p);
this.g = new DerInteger(g);
}
示例10: CreateRandomInRange
/**
* Return a random BigInteger not less than 'min' and not greater than 'max'
*
* @param min the least value that may be generated
* @param max the greatest value that may be generated
* @param random the source of randomness
* @return a random BigInteger value in the range [min,max]
*/
public static BigInteger CreateRandomInRange(
BigInteger min,
BigInteger max,
// TODO Should have been just Random class
SecureRandom random)
{
int cmp = min.CompareTo(max);
if (cmp >= 0)
{
if (cmp > 0)
throw new ArgumentException("'min' may not be greater than 'max'");
return min;
}
if (min.BitLength > max.BitLength / 2)
{
return CreateRandomInRange(BigInteger.Zero, max.Subtract(min), random).Add(min);
}
for (int i = 0; i < MaxIterations; ++i)
{
BigInteger x = new BigInteger(max.BitLength, random);
if (x.CompareTo(min) >= 0 && x.CompareTo(max) <= 0)
{
return x;
}
}
// fall back to a faster (restricted) method
return new BigInteger(max.Subtract(min).BitLength - 1, random).Add(min);
}
示例11: DHPrivateKeyParameters
public DHPrivateKeyParameters(
BigInteger x,
DHParameters parameters)
: base(true, parameters)
{
this.x = x;
}
示例12: Gost3410Parameters
public Gost3410Parameters(
BigInteger p,
BigInteger q,
BigInteger a)
: this(p, q, a, null)
{
}
示例13: DerInteger
public DerInteger(
BigInteger value)
{
if (value == null)
throw new ArgumentNullException("value");
bytes = value.ToByteArray();
}
示例14: MacData
public MacData(
DigestInfo digInfo,
byte[] salt,
int iterationCount)
{
this.digInfo = digInfo;
this.salt = (byte[]) salt.Clone();
this.iterationCount = BigInteger.ValueOf(iterationCount);
}
示例15: DsaParameter
public DsaParameter(
BigInteger p,
BigInteger q,
BigInteger g)
{
this.p = new DerInteger(p);
this.q = new DerInteger(q);
this.g = new DerInteger(g);
}