Package java.security

Examples of java.security.InvalidParameterException


    public ECCKeyGenParameterSpec(int m, int t)
        throws InvalidParameterException
    {
        if (m < 1)
        {
            throw new InvalidParameterException("m must be positive");
        }
        if (m > 32)
        {
            throw new InvalidParameterException("m is too large");
        }
        this.m = m;
        n = 1 << m;
        if (t < 0)
        {
            throw new InvalidParameterException("t must be positive");
        }
        if (t > n)
        {
            throw new InvalidParameterException("t must be less than n = 2^m");
        }
        this.t = t;
        fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m);
    }
View Full Code Here


        throws InvalidParameterException
    {
        this.m = m;
        if (m < 1)
        {
            throw new InvalidParameterException("m must be positive");
        }
        if (m > 32)
        {
            throw new InvalidParameterException(" m is too large");
        }
        this.n = 1 << m;
        this.t = t;
        if (t < 0)
        {
            throw new InvalidParameterException("t must be positive");
        }
        if (t > n)
        {
            throw new InvalidParameterException("t must be less than n = 2^m");
        }
        if ((PolynomialRingGF2.degree(poly) == m)
            && (PolynomialRingGF2.isIrreducible(poly)))
        {
            this.fieldPoly = poly;
        }
        else
        {
            throw new InvalidParameterException(
                "polynomial is not a field polynomial for GF(2^m)");
        }
    }
View Full Code Here

  private byte[] signature;

  public Object engineGetParameter(String p)
    throws InvalidParameterException
  {
    throw new InvalidParameterException();
  }
View Full Code Here

  }

  public void engineSetParameter(String p, Object o)
    throws InvalidParameterException
  {
    throw new InvalidParameterException();
  }
View Full Code Here

    path = path.replace(variable, value);
  }

  private void validateContains(String variable) {
    if (!path.contains(variable)) {
      throw new InvalidParameterException(path + " doesn't have " + variable + " as a variable.");
    }
  }
View Full Code Here

   * @param media
   *            the media to add
   */
  public void addMedia(ProductMedia media) {
    if (media == null)
      throw new InvalidParameterException(
          "the product media cannot be null");
    if (this.medias == null)
      this.medias = new ArrayList<ProductMedia>();
    media.setProduct(this);
    this.medias.add(media);
View Full Code Here

   * @param link
   *            the link to add
   */
  public void addLink(ProductLink link) {
    if (link == null)
      throw new InvalidParameterException(
          "the product link cannot be null");
    if (this.links == null)
      this.links = new HashSet<ProductLink>();
    this.links.add(link);
  }
View Full Code Here

   * @param child
   *            the child to add
   */
  public void addChild(Category child) {
    if (child == null)
      throw new InvalidParameterException("the child cannot be null");
    if (children == null)
      children = new ArrayList<Category>();
    child.setParent(this);
    children.add(child);
  }
View Full Code Here

        listType == LIST_TYPE_SIMPLE ||
        listType == LIST_TYPE_HYBRID ) {
      this.listType = listType;
    }
    else {
      throw new InvalidParameterException(MessageLocalization.getComposedMessage("invalid.listtype.value"));
    }
  }
View Full Code Here

        shadow = shadowColor;
    }

    public EtchedBorder(final int etchType, final Color highlightColor, final Color shadowColor) {
        if (etchType != RAISED && etchType != LOWERED) {
            throw new InvalidParameterException(INCORRECT_BORDER_TYPE_EXCEPTION_TEXT);
        }
        this.etchType = etchType;
        highlight = highlightColor;
        shadow = shadowColor;
    }
View Full Code Here

TOP

Related Classes of java.security.InvalidParameterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.