You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
using System;
|
|
|
|
using Org.BouncyCastle.Asn1;
|
|
using Org.BouncyCastle.Asn1.X9;
|
|
using Org.BouncyCastle.Math;
|
|
using Org.BouncyCastle.Math.EC;
|
|
|
|
namespace Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
public class ECNamedDomainParameters
|
|
: ECDomainParameters
|
|
{
|
|
private readonly DerObjectIdentifier name;
|
|
|
|
public DerObjectIdentifier Name
|
|
{
|
|
get { return name; }
|
|
}
|
|
|
|
public ECNamedDomainParameters(DerObjectIdentifier name, ECDomainParameters dp)
|
|
: this(name, dp.Curve, dp.G, dp.N, dp.H, dp.GetSeed())
|
|
{
|
|
}
|
|
|
|
public ECNamedDomainParameters(DerObjectIdentifier name, X9ECParameters x9)
|
|
: base(x9)
|
|
{
|
|
this.name = name;
|
|
}
|
|
|
|
public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n)
|
|
: base(curve, g, n)
|
|
{
|
|
this.name = name;
|
|
}
|
|
|
|
public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n, BigInteger h)
|
|
: base(curve, g, n, h)
|
|
{
|
|
this.name = name;
|
|
}
|
|
|
|
public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n, BigInteger h, byte[] seed)
|
|
#pragma warning disable CS0612 // 类型或成员已过时
|
|
: base(curve, g, n, h, seed)
|
|
#pragma warning restore CS0612 // 类型或成员已过时
|
|
{
|
|
this.name = name;
|
|
}
|
|
}
|
|
}
|
|
|