diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-16 11:44:28 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-16 11:44:28 +0700 |
commit | 4b12424681318b644259927b665d3de656fccd8a (patch) | |
tree | f91f4d7911e6ff0f9b1438a7082a14a983b53b43 | |
parent | Mark user-customizable GCM multipliers Obsolete (diff) | |
download | BouncyCastle.NET-ed25519-4b12424681318b644259927b665d3de656fccd8a.tar.xz |
Use DoesNotReturnAttribute
-rw-r--r-- | crypto/src/crypto/Check.cs | 10 |
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); } } |