示例#1
0
        public bool Equals(EccPoint b)
        {
            // Both points are infinity
            if (this.Infinity && b.Infinity)
            {
                return(true);
            }

            // One point is infinity and the other is not
            if (this.Infinity || b.Infinity)
            {
                return(false);
            }

            // Compare (x,y) values
            if (this.X == b.X && this.Y == b.Y)
            {
                return(true);
            }

            return(false);
        }
示例#2
0
 public EccKeyPair(EccPoint q)
 {
     PublicQ = q;
 }
示例#3
0
 public EccKeyPair(EccPoint q, BigInteger d)
 {
     PublicQ  = q;
     PrivateD = d;
 }