DataLengthException.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Crypto
  4. {
  5. /**
  6. * this exception is thrown if a buffer that is meant to have output
  7. * copied into it turns out to be too short, or if we've been given
  8. * insufficient input. In general this exception will Get thrown rather
  9. * than an ArrayOutOfBounds exception.
  10. */
  11. #if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || NETFX_CORE || PORTABLE)
  12. [Serializable]
  13. #endif
  14. public class DataLengthException
  15. : CryptoException
  16. {
  17. /**
  18. * base constructor.
  19. */
  20. public DataLengthException()
  21. {
  22. }
  23. /**
  24. * create a DataLengthException with the given message.
  25. *
  26. * @param message the message to be carried with the exception.
  27. */
  28. public DataLengthException(
  29. string message)
  30. : base(message)
  31. {
  32. }
  33. public DataLengthException(
  34. string message,
  35. Exception exception)
  36. : base(message, exception)
  37. {
  38. }
  39. }
  40. }
  41. #endif