Code example for MGF1ParameterSpec

Methods: getDigestAlgorithm

0
            fail("NullPointerException has not been thrown");
        } catch (NullPointerException ok) {
            //expected 
        } 
    } 
 
    /** 
     * Test for <code>getDigestAlgorithm</code> method<br> 
     * Assertion: returns the algorithm name of the message 
     * digest used by the mask generation function 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "getDigestAlgorithm", 
        args = {} 
    ) 
    public final void testGetDigestAlgorithm() { 
        MGF1ParameterSpec aps = new MGF1ParameterSpec(testAlgName);
        assertTrue(testAlgName.equals(aps.getDigestAlgorithm()));
    }