예제 #1
0
 /// <summary>
 /// Returns a hash code value for this elliptic curve point. </summary>
 /// <returns> a hash code value. </returns>
 public override int HashCode()
 {
     if (this == POINT_INFINITY)
     {
         return(0);
     }
     return(x.HashCode() << 5 + y.HashCode());
 }
예제 #2
0
        /// <summary>
        /// Returns a hash code value for this characteristic 2
        /// finite field. </summary>
        /// <returns> a hash code value. </returns>
        public override int HashCode()
        {
            int value = m << 5;

            value += (Rp == null? 0:Rp.HashCode());
            // no need to involve ks here since ks and rp
            // should be equivalent.
            return(value);
        }
예제 #3
0
 /// <summary>
 /// Returns a hash code value for this elliptic curve. </summary>
 /// <returns> a hash code value computed from the hash codes of the field, A,
 /// and B, as follows:
 /// <pre>{@code
 ///     (field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2)
 /// }</pre> </returns>
 public override int HashCode()
 {
     return(Field_Renamed.HashCode() << 6 + (a.HashCode() << 4) + (b.HashCode() << 2));
 }