CryptographicException.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Globalization;
  5. using System.Runtime.Serialization;
  6. namespace System.Security.Cryptography
  7. {
  8. [Serializable]
  9. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  10. public class CryptographicException : SystemException
  11. {
  12. public CryptographicException()
  13. : base(SR.Arg_CryptographyException)
  14. {
  15. }
  16. public CryptographicException(int hr)
  17. : base(SR.Arg_CryptographyException)
  18. {
  19. HResult = hr;
  20. }
  21. public CryptographicException(string message)
  22. : base(message)
  23. {
  24. }
  25. public CryptographicException(string message, Exception inner)
  26. : base(message, inner)
  27. {
  28. }
  29. public CryptographicException(string format, string insert)
  30. : base(string.Format(CultureInfo.CurrentCulture, format, insert))
  31. {
  32. }
  33. protected CryptographicException(SerializationInfo info, StreamingContext context)
  34. : base(info, context)
  35. {
  36. }
  37. }
  38. }