if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId())) { throw new InvalidParameterException("unknown mask generation function specified");
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId())) { throw new InvalidParameterException("unknown mask generation function specified");
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId()))
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId()))
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals( PKCSObjectIdentifiers.id_mgf1.getId())) { throw new InvalidParameterException("unknown mask generation function specified");
protected void engineInit( byte[] params) throws IOException { try { RSASSAPSSparams pssP = RSASSAPSSparams.getInstance(params); if (!pssP.getMaskGenAlgorithm().getAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1)) { throw new IOException("unknown mask generation function: " + pssP.getMaskGenAlgorithm().getAlgorithm()); } currentSpec = new PSSParameterSpec( MessageDigestUtils.getDigestName(pssP.getHashAlgorithm().getAlgorithm()), PSSParameterSpec.DEFAULT.getMGFAlgorithm(), new MGF1ParameterSpec(MessageDigestUtils.getDigestName(AlgorithmIdentifier.getInstance(pssP.getMaskGenAlgorithm().getParameters()).getAlgorithm())), pssP.getSaltLength().intValue(), pssP.getTrailerField().intValue()); } catch (ClassCastException e) { throw new IOException("Not a valid PSS Parameter encoding."); } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Not a valid PSS Parameter encoding."); } }
protected void engineInit( byte[] params) throws IOException { try { RSASSAPSSparams pssP = RSASSAPSSparams.getInstance(params); if (!pssP.getMaskGenAlgorithm().getAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1)) { throw new IOException("unknown mask generation function: " + pssP.getMaskGenAlgorithm().getAlgorithm()); } currentSpec = new PSSParameterSpec( MessageDigestUtils.getDigestName(pssP.getHashAlgorithm().getAlgorithm()), PSSParameterSpec.DEFAULT.getMGFAlgorithm(), new MGF1ParameterSpec(MessageDigestUtils.getDigestName(AlgorithmIdentifier.getInstance(pssP.getMaskGenAlgorithm().getParameters()).getAlgorithm())), pssP.getSaltLength().intValue(), pssP.getTrailerField().intValue()); } catch (ClassCastException e) { throw new IOException("Not a valid PSS Parameter encoding."); } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Not a valid PSS Parameter encoding."); } }
String specMgfAlgorithm = spec.getMGFAlgorithm(); if (!EvpMdRef.MGF1_ALGORITHM_NAME.equalsIgnoreCase(specMgfAlgorithm) && !EvpMdRef.MGF1_OID.equals(specMgfAlgorithm)) {
String specMgfAlgorithm = spec.getMGFAlgorithm(); if (!EvpMdRef.MGF1_ALGORITHM_NAME.equalsIgnoreCase(specMgfAlgorithm) && !EvpMdRef.MGF1_OID.equals(specMgfAlgorithm)) {
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId()))
if (!newParamSpec.getMGFAlgorithm().equalsIgnoreCase("MGF1") && !newParamSpec.getMGFAlgorithm().equals(PKCSObjectIdentifiers.id_mgf1.getId()))