Exemple #1
0
 /*
  * Create a new instance with the provided elements. The
  * constructor verifies that the provided point is part of
  * the curve.
  */
 public ECPublicKey(ECCurve curve, byte[] Pub)
 {
     this.curve = curve;
     this.pub   = Pub;
     iPub       = curve.Decode(Pub);
     if (iPub.IsInfinity)
     {
         throw new CryptoException(
                   "Public key point is infinity");
     }
     hashCode = curve.GetHashCode()
                ^ (int)BigInt.HashInt(iPub.X)
                ^ (int)BigInt.HashInt(iPub.Y);
 }