mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* CryptographicException.cs: Default HResult to CORSEC_E_CRYPTO (0x80131430) as documented. * CryptographicUnexpectedOperationException.cs: Default HResult to CORSEC_E_CRYPTO_UNEX_OPER (0x80131431) as documented. svn path=/trunk/mcs/; revision=10887
55 lines
1.1 KiB
C#
Executable File
55 lines
1.1 KiB
C#
Executable File
//
|
|
// System.Security.Cryptography.CryptographicException.cs
|
|
//
|
|
// Author:
|
|
// Thomas Neidhart ([email protected])
|
|
//
|
|
|
|
using System;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System.Security.Cryptography {
|
|
|
|
[Serializable]
|
|
public class CryptographicException : SystemException {
|
|
|
|
// Constructors
|
|
public CryptographicException ()
|
|
: base ("Error occured during a cryptographic operation.")
|
|
{
|
|
// default to CORSEC_E_CRYPTO
|
|
// defined as EMAKEHR(0x1430) in CorError.h
|
|
HResult = unchecked ((int)0x80131430);
|
|
}
|
|
|
|
public CryptographicException (int hr)
|
|
{
|
|
HResult = hr;
|
|
}
|
|
|
|
public CryptographicException (string message)
|
|
: base (message)
|
|
{
|
|
HResult = unchecked ((int)0x80131430);
|
|
}
|
|
|
|
public CryptographicException (string message, Exception inner)
|
|
: base (message, inner)
|
|
{
|
|
HResult = unchecked ((int)0x80131430);
|
|
}
|
|
|
|
public CryptographicException (string format, string insert)
|
|
: base (String.Format(format, insert))
|
|
{
|
|
HResult = unchecked ((int)0x80131430);
|
|
}
|
|
|
|
protected CryptographicException (SerializationInfo info, StreamingContext context)
|
|
: base (info, context)
|
|
{
|
|
}
|
|
}
|
|
|
|
}
|