From daec40507f75c8bbe80f54e25338d31a2b411e39 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 12 Jun 2024 18:09:06 +0700 Subject: DerInteger constants for small values --- crypto/src/asn1/DerInteger.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crypto/src/asn1/DerInteger.cs') 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); -- cgit 1.4.1