Examples of ECFieldF2m


Examples of java.security.spec.ECFieldF2m

    public final void testECFieldF2mint() {
        for(int i=0; i<intCtorTestParameters.length; i++) {
            ECFieldF2mDomainParams tp = intCtorTestParameters[i];
            try {
                // perform test
                new ECFieldF2m(tp.m);
               
                if (tp.x != null) {
                    // exception has been expected
                    fail(getName() + ", set " + i +
                            " FAILED: expected exception has not been thrown");
View Full Code Here

Examples of java.security.spec.ECFieldF2m

    public final void testECFieldF2mintintArray() {
        for(int i=0; i<intIntArrayCtorTestParameters.length; i++) {
            ECFieldF2mDomainParams tp = intIntArrayCtorTestParameters[i];
            try {
                // perform test
                new ECFieldF2m(tp.m, tp.ks);
               
                if (tp.x != null) {
                    // exception has been expected
                    fail(getName() + ", set " + i +
                            " FAILED: expected exception has not been thrown");
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: must return the same value if invoked
     * repeatedly on the same object.
     */
    public final void testHashCode01() {
        ECFieldF2m f = new ECFieldF2m(2000);
        int hc = f.hashCode();
        assertTrue(hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode());
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: must return the same value if invoked
     * repeatedly on the same object.
     */
    public final void testHashCode02() {
        ECFieldF2m f = new ECFieldF2m(2000, new int[] {981, 2, 1});
        int hc = f.hashCode();
        assertTrue(hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode() &&
                   hc == f.hashCode());
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: must return the same value if invoked
     * on equal (according to the <code>equals(Object)</code> method) objects.
     */
    public final void testHashCode03() {
        assertTrue(new ECFieldF2m(111).hashCode() ==
                   new ECFieldF2m(111).hashCode());
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: must return the same value if invoked
     * on equal (according to the <code>equals(Object)</code> method) objects.
     */
    public final void testHashCode04() {
        assertTrue(new ECFieldF2m(2000, new int[] {981, 2, 1}).hashCode() ==
                   new ECFieldF2m(2000, new int[] {981, 2, 1}).hashCode());
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: must return the same value if invoked
     * on equal (according to the <code>equals(Object)</code> method) objects.
     */
    public final void testHashCode05() {
        assertTrue(new ECFieldF2m(2000, new int[] {981, 2, 1}).hashCode() ==
                   new ECFieldF2m(2000, BigInteger.valueOf(0L).
                                        setBit(0).setBit(1).setBit(2).
                                        setBit(981).setBit(2000)).hashCode());
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     * Test #1 for <code>equals()</code> method.<br>
     *
     * Assertion: object equals to itself.
     */
    public final void testEqualsObject01() {
        ECFieldF2m obj = new ECFieldF2m(1999, new int[] {367});
        assertTrue(obj.equals(obj));
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     * Test #2 for <code>equals()</code> method.<br>
     *
     * Assertion: normal basis - objects equal if their m are equal.
     */
    public final void testEqualsObject02() {
        assertTrue(new ECFieldF2m(43).equals(new ECFieldF2m(43)));
    }
View Full Code Here

Examples of java.security.spec.ECFieldF2m

     *
     * Assertion: trinomial basis - objects equal if their m, and rp
     * are mutually equal.
     */
    public final void testEqualsObject03() {
        assertTrue(new ECFieldF2m(1999, new int[] {367}).equals(
                   new ECFieldF2m(1999, BigInteger.valueOf(0L).
                                        setBit(0).setBit(367).setBit(1999))));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.