summary refs log tree commit diff
path: root/crypto/src/asn1/BERTaggedObjectParser.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-06 15:40:40 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-06 15:40:40 +0700
commit32ceae264dc39331174d9db71fe38948648c7989 (patch)
tree180846e6d6f42b56659a71facae5c7d582a2e14f /crypto/src/asn1/BERTaggedObjectParser.cs
parentMisc. refactoring after bc-fips-csharp updates (diff)
downloadBouncyCastle.NET-ed25519-32ceae264dc39331174d9db71fe38948648c7989.tar.xz
New tagged object methods and refactoring
Diffstat (limited to 'crypto/src/asn1/BERTaggedObjectParser.cs')
-rw-r--r--crypto/src/asn1/BERTaggedObjectParser.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/src/asn1/BERTaggedObjectParser.cs b/crypto/src/asn1/BERTaggedObjectParser.cs
index ecb4a4a13..b1a8cd896 100644
--- a/crypto/src/asn1/BERTaggedObjectParser.cs
+++ b/crypto/src/asn1/BERTaggedObjectParser.cs
@@ -32,6 +32,11 @@ namespace Org.BouncyCastle.Asn1
 			get { return m_tagNo; }
 		}
 
+        public bool HasContextTag()
+        {
+            return m_tagClass == Asn1Tags.ContextSpecific;
+        }
+
         public bool HasContextTag(int tagNo)
         {
             return m_tagClass == Asn1Tags.ContextSpecific && m_tagNo == tagNo;
@@ -42,6 +47,11 @@ namespace Org.BouncyCastle.Asn1
             return m_tagClass == tagClass && m_tagNo == tagNo;
         }
 
+        public bool HasTagClass(int tagClass)
+        {
+            return m_tagClass == tagClass;
+        }
+
         public virtual IAsn1Convertible ParseBaseUniversal(bool declaredExplicit, int baseTagNo)
         {
             if (declaredExplicit)