lalala
[mono.git] / mcs / class / corlib / System.Security.Cryptography / CryptographicException.cs
1 //
2 // System.Security.Cryptography.CryptographicException.cs
3 //
4 // Author:
5 //   Thomas Neidhart (tome@sbox.tugraz.at)
6 //
7
8 using System;
9 using System.Runtime.Serialization;
10
11 namespace System.Security.Cryptography {
12
13 [Serializable]
14 public class CryptographicException : SystemException {
15
16         // Constructors
17         public CryptographicException ()
18                 : base ("Error occured during a cryptographic operation.")
19         {
20                 // default to CORSEC_E_CRYPTO
21                 // defined as EMAKEHR(0x1430) in CorError.h
22                 HResult = unchecked ((int)0x80131430);
23         }
24
25         public CryptographicException (int hr)
26         {
27                 HResult = hr;
28         }
29
30         public CryptographicException (string message)
31                 : base (message)
32         {
33                 HResult = unchecked ((int)0x80131430);
34         }
35
36         public CryptographicException (string message, Exception inner)
37                 : base (message, inner)
38         {
39                 HResult = unchecked ((int)0x80131430);
40         }
41
42         public CryptographicException (string format, string insert)
43                 : base (String.Format(format, insert))
44         {
45                 HResult = unchecked ((int)0x80131430);
46         }
47
48         protected CryptographicException (SerializationInfo info, StreamingContext context)
49                 : base (info, context) 
50         {
51         }
52 }
53
54 }