summary refs log tree commit diff
path: root/crypto/src/asn1/DerInteger.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-06-12 18:09:06 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-06-12 18:09:06 +0700
commitdaec40507f75c8bbe80f54e25338d31a2b411e39 (patch)
treef336873fdf0be8476dc45de28a30dda37976bd43 /crypto/src/asn1/DerInteger.cs
parentDilithium SampleInBall change and KATs updated (diff)
downloadBouncyCastle.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.cs7
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);