Code example for MGF1ParameterSpec

Methods: getDigestAlgorithm

0
        String alg1 = s1.getMGFAlgorithm();
        String alg2 = s2.getMGFAlgorithm();
        if (alg1.equals(alg2)) {
            MGF1ParameterSpec mp1 = (MGF1ParameterSpec)s1.getMGFParameters();
            MGF1ParameterSpec mp2 = (MGF1ParameterSpec)s2.getMGFParameters();
            alg1 = mp1.getDigestAlgorithm();
            alg2 = mp2.getDigestAlgorithm();
            if (alg1.equals(alg2)) {
                return true; 
            } else { 
                System.out.println("MGF's MD algos: " + alg1 + " vs " + alg2);
                return false; 
            } 
        } else { 
            System.out.println("MGF algos: " + alg1 + " vs " + alg2);
            return false; 
        } 
    } 
 
    private static boolean comparePSource(OAEPParameterSpec s1,
Connect your IDE to all the code out there  Get Codota for Java