Code example for ECPrivateKeySpec

0
        } 
 
 
        // Test case 2: params is null 
        try { 
            new ECPrivateKeySpec(BigInteger.valueOf(0L), null);
            fail("#2: Expected NPE not thrown");
        } catch (NullPointerException ok) {
        } 
 
 
        // Test case 3: both s and params are null 
        try { 
            new ECPrivateKeySpec(null, null);
            fail("#3: Expected NPE not thrown");
        } catch (NullPointerException ok) {
        } 
    } 
 
    /** 
     * Test for <code>getParams()</code> method<br>