Code example for OAEPParameterSpec

Methods: getMGFAlgorithm

0
        args = {} 
    ) 
    public void testGetDigestAlgorithm() { 
        String mdName = "SHA-1";
        String mgfName = "MGF1";
        AlgorithmParameterSpec mgfSpec = MGF1ParameterSpec.SHA1;
        PSource pSrc = PSource.PSpecified.DEFAULT;
 
        OAEPParameterSpec ps = new OAEPParameterSpec(mdName, mgfName,
                                                                mgfSpec, pSrc);
        assertTrue("The returned value does not equal to the "
                + "value specified in the constructor.", 
                ps.getDigestAlgorithm().equals(mdName));
    } 
 
    /** 
     * getMGFAlgorithm() method testing. 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "",