diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-12 18:09:06 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-12 18:09:06 +0700 |
commit | daec40507f75c8bbe80f54e25338d31a2b411e39 (patch) | |
tree | f336873fdf0be8476dc45de28a30dda37976bd43 /crypto/src/asn1/DerInteger.cs | |
parent | Dilithium SampleInBall change and KATs updated (diff) | |
download | BouncyCastle.NET-ed25519-daec40507f75c8bbe80f54e25338d31a2b411e39.tar.xz |
DerInteger constants for small values
Diffstat (limited to 'crypto/src/asn1/DerInteger.cs')
-rw-r--r-- | crypto/src/asn1/DerInteger.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/src/asn1/DerInteger.cs b/crypto/src/asn1/DerInteger.cs index 81d6437c7..d68a71e9d 100644 --- a/crypto/src/asn1/DerInteger.cs +++ b/crypto/src/asn1/DerInteger.cs @@ -23,6 +23,13 @@ namespace Org.BouncyCastle.Asn1 public const string AllowUnsafeProperty = "Org.BouncyCastle.Asn1.AllowUnsafeInteger"; + public static readonly DerInteger Zero = new DerInteger(0); + public static readonly DerInteger One = new DerInteger(1); + public static readonly DerInteger Two = new DerInteger(2); + public static readonly DerInteger Three = new DerInteger(3); + public static readonly DerInteger Four = new DerInteger(4); + public static readonly DerInteger Five = new DerInteger(5); + internal static bool AllowUnsafe() { string allowUnsafeValue = Platform.GetEnvironmentVariable(AllowUnsafeProperty); |