diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-05-10 19:04:32 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-05-10 19:04:32 +0700 |
commit | b48d562bf5c90759559aab53f1a19a4285313a2f (patch) | |
tree | 582e7f025d688019371d168c2a287714d46ec2ad /crypto/src/asn1/cms/EncryptedContentInfo.cs | |
parent | Improve Asn1OctetString.Asn1Equals (diff) | |
download | BouncyCastle.NET-ed25519-b48d562bf5c90759559aab53f1a19a4285313a2f.tar.xz |
Obsolete several constructors to make private later
Diffstat (limited to 'crypto/src/asn1/cms/EncryptedContentInfo.cs')
-rw-r--r-- | crypto/src/asn1/cms/EncryptedContentInfo.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/asn1/cms/EncryptedContentInfo.cs b/crypto/src/asn1/cms/EncryptedContentInfo.cs index 2d4a744a3..af697af5d 100644 --- a/crypto/src/asn1/cms/EncryptedContentInfo.cs +++ b/crypto/src/asn1/cms/EncryptedContentInfo.cs @@ -1,3 +1,5 @@ +using System; + using Org.BouncyCastle.Asn1.X509; namespace Org.BouncyCastle.Asn1.Cms @@ -11,12 +13,16 @@ namespace Org.BouncyCastle.Asn1.Cms return null; if (obj is EncryptedContentInfo encryptedContentInfo) return encryptedContentInfo; +#pragma warning disable CS0618 // Type or member is obsolete return new EncryptedContentInfo(Asn1Sequence.GetInstance(obj)); +#pragma warning restore CS0618 // Type or member is obsolete } public static EncryptedContentInfo GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) { +#pragma warning disable CS0618 // Type or member is obsolete return new EncryptedContentInfo(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); +#pragma warning restore CS0618 // Type or member is obsolete } private DerObjectIdentifier contentType; @@ -33,7 +39,8 @@ namespace Org.BouncyCastle.Asn1.Cms this.encryptedContent = encryptedContent; } - public EncryptedContentInfo( + [Obsolete("Use 'GetInstance' instead")] + public EncryptedContentInfo( Asn1Sequence seq) { contentType = (DerObjectIdentifier) seq[0]; |