CryptographicException.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.Runtime.Serialization;
  5. namespace System.Security.Cryptography
  6. {
  7. [Serializable]
  8. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  9. public class CryptographicException : SystemException
  10. {
  11. public CryptographicException()
  12. : base(SR.Arg_CryptographyException)
  13. {
  14. }
  15. public CryptographicException(int hr)
  16. : base(SR.Arg_CryptographyException)
  17. {
  18. HResult = hr;
  19. }
  20. public CryptographicException(string? message)
  21. : base(message)
  22. {
  23. }
  24. public CryptographicException(string? message, Exception? inner)
  25. : base(message, inner)
  26. {
  27. }
  28. public CryptographicException(string format, string? insert)
  29. : base(string.Format(format, insert))
  30. {
  31. }
  32. protected CryptographicException(SerializationInfo info, StreamingContext context)
  33. : base(info, context)
  34. {
  35. }
  36. }
  37. }