1. /*
  2. * @(#)InvalidKeySpecException.java 1.16 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.security.spec;
  8. import java.security.GeneralSecurityException;
  9. /**
  10. * This is the exception for invalid key specifications.
  11. *
  12. * @author Jan Luehe
  13. *
  14. * @version 1.16, 12/19/03
  15. *
  16. * @see KeySpec
  17. *
  18. * @since 1.2
  19. */
  20. public class InvalidKeySpecException extends GeneralSecurityException {
  21. private static final long serialVersionUID = 3546139293998810778L;
  22. /**
  23. * Constructs an InvalidKeySpecException with no detail message. A
  24. * detail message is a String that describes this particular
  25. * exception.
  26. */
  27. public InvalidKeySpecException() {
  28. super();
  29. }
  30. /**
  31. * Constructs an InvalidKeySpecException with the specified detail
  32. * message. A detail message is a String that describes this
  33. * particular exception.
  34. *
  35. * @param msg the detail message.
  36. */
  37. public InvalidKeySpecException(String msg) {
  38. super(msg);
  39. }
  40. /**
  41. * Creates a <code>InvalidKeySpecException</code> with the specified
  42. * detail message and cause.
  43. *
  44. * @param message the detail message (which is saved for later retrieval
  45. * by the {@link #getMessage()} method).
  46. * @param cause the cause (which is saved for later retrieval by the
  47. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  48. * and indicates that the cause is nonexistent or unknown.)
  49. * @since 1.5
  50. */
  51. public InvalidKeySpecException(String message, Throwable cause) {
  52. super(message, cause);
  53. }
  54. /**
  55. * Creates a <code>InvalidKeySpecException</code> with the specified cause
  56. * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
  57. * (which typically contains the class and detail message of
  58. * <tt>cause</tt>).
  59. *
  60. * @param cause the cause (which is saved for later retrieval by the
  61. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  62. * and indicates that the cause is nonexistent or unknown.)
  63. * @since 1.5
  64. */
  65. public InvalidKeySpecException(Throwable cause) {
  66. super(cause);
  67. }
  68. }