diff options
Diffstat (limited to 'crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs')
-rw-r--r-- | crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs b/crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs index fb393b9ba..cbbc9d8ba 100644 --- a/crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs +++ b/crypto/src/asn1/cms/KeyAgreeRecipientIdentifier.cs @@ -30,10 +30,11 @@ namespace Org.BouncyCastle.Asn1.Cms throw new ArgumentException("Invalid KeyAgreeRecipientIdentifier: " + Platform.GetTypeName(obj), nameof(obj)); } - public static KeyAgreeRecipientIdentifier GetInstance(Asn1TaggedObject obj, bool isExplicit) - { - return Asn1Utilities.GetInstanceFromChoice(obj, isExplicit, GetInstance); - } + public static KeyAgreeRecipientIdentifier GetInstance(Asn1TaggedObject obj, bool isExplicit) => + Asn1Utilities.GetInstanceChoice(obj, isExplicit, GetInstance); + + public static KeyAgreeRecipientIdentifier GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) => + Asn1Utilities.GetTaggedChoice(taggedObject, declaredExplicit, GetInstance); private readonly IssuerAndSerialNumber m_issuerSerial; private readonly RecipientKeyIdentifier m_rKeyID; |