当前位置: 首页>>代码示例>>C#>>正文


C# ECPoint.Normalize方法代码示例

本文整理汇总了C#中Org.BouncyCastle.Math.EC.ECPoint.Normalize方法的典型用法代码示例。如果您正苦于以下问题:C# ECPoint.Normalize方法的具体用法?C# ECPoint.Normalize怎么用?C# ECPoint.Normalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Org.BouncyCastle.Math.EC.ECPoint的用法示例。


在下文中一共展示了ECPoint.Normalize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ECPublicKeyParameters

        public ECPublicKeyParameters(
            ECPoint				q,
            DerObjectIdentifier publicKeyParamSet)
            : base("ECGOST3410", false, publicKeyParamSet)
        {
            if (q == null)
                throw new ArgumentNullException("q");

            this.q = q.Normalize();
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:10,代码来源:ECPublicKeyParameters.cs

示例2: ECDomainParameters

        public ECDomainParameters(
            ECCurve     curve,
            ECPoint     g,
            BigInteger  n,
            BigInteger  h,
            byte[]      seed)
        {
            if (curve == null)
                throw new ArgumentNullException("curve");
            if (g == null)
                throw new ArgumentNullException("g");
            if (n == null)
                throw new ArgumentNullException("n");
            if (h == null)
                throw new ArgumentNullException("h");

            this.curve = curve;
            this.g = g.Normalize();
            this.n = n;
            this.h = h;
            this.seed = Arrays.Clone(seed);
        }
开发者ID:JohnMalmsteen,项目名称:mobile-apps-tower-defense,代码行数:22,代码来源:ECDomainParameters.cs

示例3: X9ECPoint

 public X9ECPoint(ECPoint p, bool compressed)
 {
     this.p = p.Normalize();
     this.encoding = new DerOctetString(p.GetEncoded(compressed));
 }
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:5,代码来源:X9ECPoint.cs

示例4: ImportPoint

        public virtual ECPoint ImportPoint(ECPoint p)
        {
            if (this == p.Curve)
            {
                return p;
            }
            if (p.IsInfinity)
            {
                return Infinity;
            }

            // TODO Default behaviour could be improved if the two curves have the same coordinate system by copying any Z coordinates.
            p = p.Normalize();

            return ValidatePoint(p.XCoord.ToBigInteger(), p.YCoord.ToBigInteger(), p.IsCompressed);
        }
开发者ID:JohnMalmsteen,项目名称:mobile-apps-tower-defense,代码行数:16,代码来源:ECCurve.cs

示例5: X9ECParameters

        public X9ECParameters(
            ECCurve		curve,
            ECPoint		g,
            BigInteger	n,
            BigInteger	h,
            byte[]		seed)
        {
            this.curve = curve;
            this.g = g.Normalize();
            this.n = n;
            this.h = h;
            this.seed = seed;

            if (ECAlgorithms.IsFpCurve(curve))
            {
                this.fieldID = new X9FieldID(curve.Field.Characteristic);
            }
            else if (ECAlgorithms.IsF2mCurve(curve))
            {
                IPolynomialExtensionField field = (IPolynomialExtensionField)curve.Field;
                int[] exponents = field.MinimalPolynomial.GetExponentsPresent();
                if (exponents.Length == 3)
                {
                    this.fieldID = new X9FieldID(exponents[2], exponents[1]);
                }
                else if (exponents.Length == 5)
                {
                    this.fieldID = new X9FieldID(exponents[4], exponents[1], exponents[2], exponents[3]);
                }
                else
                {
                    throw new ArgumentException("Only trinomial and pentomial curves are supported");
                }
            }
            else
            {
                throw new ArgumentException("'curve' is of an unsupported type");
            }
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:39,代码来源:X9ECParameters.cs

示例6: X9ECPoint

 public X9ECPoint(
     ECPoint p)
 {
     this.p = p.Normalize();
 }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:5,代码来源:X9ECPoint.cs


注:本文中的Org.BouncyCastle.Math.EC.ECPoint.Normalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。