summary refs log tree commit diff
path: root/crypto/src/asn1/crmf/EncryptedKey.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/crmf/EncryptedKey.cs')
-rw-r--r--crypto/src/asn1/crmf/EncryptedKey.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/asn1/crmf/EncryptedKey.cs b/crypto/src/asn1/crmf/EncryptedKey.cs
index 62c475f5d..6eae55da4 100644
--- a/crypto/src/asn1/crmf/EncryptedKey.cs
+++ b/crypto/src/asn1/crmf/EncryptedKey.cs
@@ -16,10 +16,11 @@ namespace Org.BouncyCastle.Asn1.Crmf
             return new EncryptedKey(EncryptedValue.GetInstance(obj));
         }
 
-        public static EncryptedKey GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
-        {
-            return Asn1Utilities.GetInstanceFromChoice(taggedObject, declaredExplicit, GetInstance);
-        }
+        public static EncryptedKey GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) =>
+            Asn1Utilities.GetInstanceChoice(taggedObject, declaredExplicit, GetInstance);
+
+        public static EncryptedKey GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) =>
+            Asn1Utilities.GetTaggedChoice(taggedObject, declaredExplicit, GetInstance);
 
         private readonly EnvelopedData m_envelopedData;
         private readonly EncryptedValue m_encryptedValue;