summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-16 11:44:28 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-16 11:44:28 +0700
commit4b12424681318b644259927b665d3de656fccd8a (patch)
treef91f4d7911e6ff0f9b1438a7082a14a983b53b43
parentMark user-customizable GCM multipliers Obsolete (diff)
downloadBouncyCastle.NET-ed25519-4b12424681318b644259927b665d3de656fccd8a.tar.xz
Use DoesNotReturnAttribute
-rw-r--r--crypto/src/crypto/Check.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/src/crypto/Check.cs b/crypto/src/crypto/Check.cs
index 035304db4..42996c920 100644
--- a/crypto/src/crypto/Check.cs
+++ b/crypto/src/crypto/Check.cs
@@ -1,4 +1,7 @@
 using System;
+#if NETCOREAPP3_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+using System.Diagnostics.CodeAnalysis;
+#endif
 
 namespace Org.BouncyCastle.Crypto
 {
@@ -42,7 +45,14 @@ namespace Org.BouncyCastle.Crypto
         }
 #endif
 
+#if NETCOREAPP3_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+        [DoesNotReturn]
+#endif
         internal static void ThrowDataLengthException(string message) => throw new DataLengthException(message);
+
+#if NETCOREAPP3_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+        [DoesNotReturn]
+#endif
         internal static void ThrowOutputLengthException(string message) => throw new OutputLengthException(message);
     }
 }