Code example for PSSParameterSpec

Methods: getMGFParameters

0
    /** 
     * Test #1 for <code>getMGFParameters()</code> method 
     * Assertion: returns mask generation function parameters  
     */ 
    public final void testGetMGFParameters01() { 
        PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                MGF1ParameterSpec.SHA1, 20, 1);
        assertTrue(MGF1ParameterSpec.SHA1.equals(pssps.getMGFParameters()));
    } 
     
    /** 
     * Test #2 for <code>getMGFParameters()</code> method 
     * Assertion: returns <code>null</code> 
     * if <code>null</code> had been passed as 
     * AlgorithmParameterSpec parameter to the ctor   
     */ 
    public final void testGetMGFParameters02() { 
        PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                null, 20, 1); 
        assertNull(pssps.getMGFParameters());
    }