Code example for EllipticCurve

Methods: equals

0
        assertTrue(c1.equals(c3) && c3.equals(c1));
 
        // test case 5: equal objects 
        c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)),
                BigInteger.ONE, BigInteger.valueOf(19L));
        c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)),
                BigInteger.valueOf(1L), BigInteger.valueOf(19L), null);
        assertTrue(c1.equals(c2) && c2.equals(c1));
    } 
 
    /** 
     * Test #1 for <code>hashCode()</code> method.<br> 
     * 
     * Assertion: must return the same value if invoked 
     * repeatedly on the same object.  
     */ 
    public final void testHashCode01() { 
        int hc = 0;
        EllipticCurve f = new EllipticCurve(new ECFieldFp(BigInteger
                .valueOf(23L)), BigInteger.ONE, BigInteger.valueOf(19L),
                new byte[24]);