Examples of ECFieldFp


Examples of java.security.spec.ECFieldFp

      * Expected: must throw <code>IllegalArgumentException</code>
      */
     public final void testECPublicKeySpec03() {
         // Valid (see note below) parameters set
         EllipticCurve c =
             new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)),
                               BigInteger.ZERO,
                               BigInteger.valueOf(4L));
         ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));

         try {
View Full Code Here

Examples of java.security.spec.ECFieldFp

     * the same object)
     */
    public final void testGetParams() {
        // Valid (see note below) parameters set
        EllipticCurve c =
            new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)),
                              BigInteger.ZERO,
                              BigInteger.valueOf(4L));
        ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));
        ECParameterSpec params =
            new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10);
View Full Code Here

Examples of java.security.spec.ECFieldFp

     * the same object)
     */
    public final void testGetW() {
        // Valid (see note below) parameters set
        EllipticCurve c =
            new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)),
                              BigInteger.ZERO,
                              BigInteger.valueOf(4L));
        ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));
        ECParameterSpec params =
            new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10);
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: creates new object of <code>ECFieldFp</code> class
     * using valid <code>p</code> (odd prime)
     */
    public final void testECFieldFp01() {
        new ECFieldFp(BigInteger.valueOf(23L));
    }
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: creates new object of <code>ECFieldFp</code> class
     * using valid <code>p</code> (odd but not prime)
     */
    public final void testECFieldFp02() {
        new ECFieldFp(BigInteger.valueOf(21L));
    }
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: IllegalArgumentException if <code>p</code> is not positive
     */
    public final void testECFieldFp03() {
        try {
            new ECFieldFp(BigInteger.valueOf(-1L));
            fail(getName() +
                    " FAILED: expected exception has not been thrown");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: IllegalArgumentException if <code>p</code> is not positive
     */
    public final void testECFieldFp04() {
        try {
            new ECFieldFp(BigInteger.valueOf(0L));
            fail(getName() +
                    " FAILED: expected exception has not been thrown");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: NullPointerException if <code>p</code> is null
     */
    public final void testECFieldFp05() {
        try {
            new ECFieldFp(null);
            fail(getName() +
                    " FAILED: expected exception has not been thrown");
        } catch (NullPointerException e) {
        }
    }
View Full Code Here

Examples of java.security.spec.ECFieldFp

     *
     * Assertion: must return the same value if invoked
     * repeatedly on the same object.
     */
    public final void testHashCode01() {
        ECFieldFp f = new ECFieldFp(BigInteger.valueOf(23L));
        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.ECFieldFp

     *
     * Assertion: must return the same value if invoked
     * on equal (according to the <code>equals(Object)</code> method) objects.
     */
    public final void testHashCode02() {
        assertTrue(new ECFieldFp(BigInteger.valueOf(23L)).hashCode() ==
                   new ECFieldFp(BigInteger.valueOf(23L)).hashCode());
    }
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.