@Override protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { throw new InvalidAlgorithmParameterException("Not supported"); }
@Override protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { throw new InvalidAlgorithmParameterException("Not supported"); }
Password translate(final AlgorithmParameterSpec parameterSpec) throws InvalidKeyException, InvalidAlgorithmParameterException { throw new InvalidAlgorithmParameterException(); }
/** * Checks that {@code trustAnchors} contains only {@code * TrustAnchor} instances. * * @throws InvalidAlgorithmParameterException if trustAnchors set is empty. */ private void checkTrustAnchors(Set<TrustAnchor> trustAnchors) throws InvalidAlgorithmParameterException { if (trustAnchors.isEmpty()) { throw new InvalidAlgorithmParameterException("trustAnchors.isEmpty()"); } } }
@Override protected void engineInit( ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { try { parent.engineInit(managerFactoryParameters); } catch (InvalidAlgorithmParameterException e) { throw e; } catch (Exception e) { throw new InvalidAlgorithmParameterException(e); } }
@Override protected void engineInit( ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { try { parent.engineInit(managerFactoryParameters); } catch (InvalidAlgorithmParameterException e) { throw e; } catch (Exception e) { throw new InvalidAlgorithmParameterException(e); } }
@Override public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { LOG.log(POILogger.DEBUG, "init(params)"); if (!(params instanceof RelationshipTransformParameterSpec)) { throw new InvalidAlgorithmParameterException(); } RelationshipTransformParameterSpec relParams = (RelationshipTransformParameterSpec) params; for (String sourceId : relParams.sourceIds) { this.sourceIds.add(sourceId); } }
@Override protected void engineInit( ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { try { parent.engineInit(managerFactoryParameters); } catch (InvalidAlgorithmParameterException e) { throw e; } catch (Exception e) { throw new InvalidAlgorithmParameterException(e); } }
throw new InvalidAlgorithmParameterException("keyStore.size() == 0");
throw e; } else { throw new InvalidAlgorithmParameterException(e.getMessage(), th);
throw e; } else { throw new InvalidAlgorithmParameterException(e.getMessage(), th);
byte[] updateSalt = updateSpec.getSalt(); if (updateSalt != null && ! Arrays.equals(updateSalt, salt)) { throw new InvalidAlgorithmParameterException(); throw new InvalidAlgorithmParameterException(); int updateIterationCount = updateSpec.getIterationCount(); if (updateIterationCount < this.iterationCount) { throw new InvalidAlgorithmParameterException(); byte[] updateSalt = updateSpec.getSalt(); if (updateSalt != null && ! Arrays.equals(updateSalt, salt)) { throw new InvalidAlgorithmParameterException(); throw new InvalidAlgorithmParameterException();
@Override public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { LOG.log(POILogger.DEBUG, "init(parent,context)"); LOG.log(POILogger.DEBUG, "parent java type: " + parent.getClass().getName()); DOMStructure domParent = (DOMStructure) parent; Node parentNode = domParent.getNode(); try { TransformDocument transDoc = TransformDocument.Factory.parse(parentNode, DEFAULT_XML_OPTIONS); XmlObject xoList[] = transDoc.getTransform().selectChildren(RelationshipReferenceDocument.type.getDocumentElementName()); if (xoList.length == 0) { LOG.log(POILogger.WARN, "no RelationshipReference/@SourceId parameters present"); } for (XmlObject xo : xoList) { String sourceId = ((CTRelationshipReference)xo).getSourceId(); LOG.log(POILogger.DEBUG, "sourceId: ", sourceId); this.sourceIds.add(sourceId); } } catch (XmlException e) { throw new InvalidAlgorithmParameterException(e); } }
@Override protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { throw new InvalidAlgorithmParameterException("Not supported"); }
@Override protected void engineInit( ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { try { parent.engineInit(managerFactoryParameters); } catch (InvalidAlgorithmParameterException e) { throw e; } catch (Exception e) { throw new InvalidAlgorithmParameterException(e); } }
/** * @param random ignored */ @Override public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException { if (params instanceof ElGamalParameterSpec) { elgParams = (ElGamalParameterSpec) params; if (!elgParams.equals(I2P_ELGAMAL_2048_SPEC)) throw new InvalidAlgorithmParameterException("unsupported ElGamalParameterSpec"); } else if (params instanceof ElGamalGenParameterSpec) { ElGamalGenParameterSpec elgGPS = (ElGamalGenParameterSpec) params; if (elgGPS.getPrimeSize() != DEFAULT_STRENGTH) throw new InvalidAlgorithmParameterException("unsupported prime size"); elgParams = I2P_ELGAMAL_2048_SPEC; } else { throw new InvalidAlgorithmParameterException("parameter object not a ElGamalParameterSpec"); } //this.random = random; initialized = true; }
/** * @throws InvalidAlgorithmParameterException if spec is ONE_SHOT_MODE and update() already called * @see #ONE_SHOT_MODE * @since 0.9.25 */ @Override protected void engineSetParameter(AlgorithmParameterSpec spec) throws InvalidAlgorithmParameterException { if (spec.equals(ONE_SHOT_MODE)) { if (oneShotBytes != null || (baos != null && baos.size() > 0)) throw new InvalidAlgorithmParameterException("update() already called"); oneShotMode = true; } else { super.engineSetParameter(spec); } }
/** * Create an EdDSANamedCurveSpec from the provided curve name. The current * implementation fetches the pre-created curve spec from a table. * @param curveName the EdDSA named curve. * @return the specification for the named curve. * @throws InvalidAlgorithmParameterException if the named curve is unknown. */ protected EdDSANamedCurveSpec createNamedCurveSpec(String curveName) throws InvalidAlgorithmParameterException { EdDSANamedCurveSpec spec = EdDSANamedCurveTable.getByName(curveName); if (spec == null) { throw new InvalidAlgorithmParameterException("unknown curve name: " + curveName); } return spec; } }
@Override public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException { if (params instanceof EdDSAParameterSpec) { edParams = (EdDSAParameterSpec) params; } else if (params instanceof EdDSAGenParameterSpec) { edParams = createNamedCurveSpec(((EdDSAGenParameterSpec) params).getName()); } else throw new InvalidAlgorithmParameterException("parameter object not a EdDSAParameterSpec"); this.random = random; initialized = true; }
@Override public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { if (params != null) { throw new InvalidAlgorithmParameterException("no parameters " + "should be specified for Canonical XML C14N algorithm"); } }