summary refs log tree commit diff
path: root/crypto/src/openpgp
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openpgp')
-rw-r--r--crypto/src/openpgp/PgpDataValidationException.cs29
-rw-r--r--crypto/src/openpgp/PgpException.cs27
-rw-r--r--crypto/src/openpgp/PgpKeyValidationException.cs29
3 files changed, 63 insertions, 22 deletions
diff --git a/crypto/src/openpgp/PgpDataValidationException.cs b/crypto/src/openpgp/PgpDataValidationException.cs

index cec5c9b68..7718ab26c 100644 --- a/crypto/src/openpgp/PgpDataValidationException.cs +++ b/crypto/src/openpgp/PgpDataValidationException.cs
@@ -1,18 +1,31 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Bcpg.OpenPgp { - /// <remarks> - /// Thrown if the IV at the start of a data stream indicates the wrong key is being used. - /// </remarks> -#if !PORTABLE + /// <summary>Thrown if the IV at the start of a data stream indicates the wrong key is being used.</summary> [Serializable] -#endif public class PgpDataValidationException : PgpException { - public PgpDataValidationException() : base() {} - public PgpDataValidationException(string message) : base(message) {} - public PgpDataValidationException(string message, Exception exception) : base(message, exception) {} + public PgpDataValidationException() + : base() + { + } + + public PgpDataValidationException(string message) + : base(message) + { + } + + public PgpDataValidationException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected PgpDataValidationException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } } } diff --git a/crypto/src/openpgp/PgpException.cs b/crypto/src/openpgp/PgpException.cs
index dc0f3482b..cb5ea3569 100644 --- a/crypto/src/openpgp/PgpException.cs +++ b/crypto/src/openpgp/PgpException.cs
@@ -1,16 +1,31 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Bcpg.OpenPgp { - /// <remarks>Generic exception class for PGP encoding/decoding problems.</remarks> -#if !PORTABLE + /// <summary>Generic exception class for PGP encoding/decoding problems.</summary> [Serializable] -#endif public class PgpException : Exception { - public PgpException() : base() {} - public PgpException(string message) : base(message) {} - public PgpException(string message, Exception exception) : base(message, exception) {} + public PgpException() + : base() + { + } + + public PgpException(string message) + : base(message) + { + } + + public PgpException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected PgpException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } } } diff --git a/crypto/src/openpgp/PgpKeyValidationException.cs b/crypto/src/openpgp/PgpKeyValidationException.cs
index df6abefe8..655c0a766 100644 --- a/crypto/src/openpgp/PgpKeyValidationException.cs +++ b/crypto/src/openpgp/PgpKeyValidationException.cs
@@ -1,18 +1,31 @@ using System; +using System.Runtime.Serialization; namespace Org.BouncyCastle.Bcpg.OpenPgp { - /// <remarks> - /// Thrown if the key checksum is invalid. - /// </remarks> -#if !PORTABLE + /// <summary>Thrown if the key checksum is invalid.</summary> [Serializable] -#endif public class PgpKeyValidationException : PgpException { - public PgpKeyValidationException() : base() {} - public PgpKeyValidationException(string message) : base(message) {} - public PgpKeyValidationException(string message, Exception exception) : base(message, exception) {} + public PgpKeyValidationException() + : base() + { + } + + public PgpKeyValidationException(string message) + : base(message) + { + } + + public PgpKeyValidationException(string message, Exception innerException) + : base(message, innerException) + { + } + + protected PgpKeyValidationException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } } }