diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-06 15:40:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-06 15:40:40 +0700 |
commit | 32ceae264dc39331174d9db71fe38948648c7989 (patch) | |
tree | 180846e6d6f42b56659a71facae5c7d582a2e14f /crypto/src/asn1/BERTaggedObjectParser.cs | |
parent | Misc. refactoring after bc-fips-csharp updates (diff) | |
download | BouncyCastle.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.cs | 10 |
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) |