diff options
Diffstat (limited to 'crypto/src/pqc/asn1/CmcePublicKey.cs')
-rw-r--r-- | crypto/src/pqc/asn1/CmcePublicKey.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/pqc/asn1/CmcePublicKey.cs b/crypto/src/pqc/asn1/CmcePublicKey.cs index 26bd6e438..c9feebdf5 100644 --- a/crypto/src/pqc/asn1/CmcePublicKey.cs +++ b/crypto/src/pqc/asn1/CmcePublicKey.cs @@ -15,7 +15,14 @@ namespace Org.BouncyCastle.Pqc.Asn1 return null; if (o is CmcePublicKey cmcePublicKey) return cmcePublicKey; +#pragma warning disable CS0618 // Type or member is obsolete return new CmcePublicKey(Asn1Sequence.GetInstance(o)); +#pragma warning restore CS0618 // Type or member is obsolete + } + + public static CmcePublicKey GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } private byte[] t; @@ -25,6 +32,7 @@ namespace Org.BouncyCastle.Pqc.Asn1 this.t = t; } + [Obsolete("Use 'GetInstance' instead")] public CmcePublicKey(Asn1Sequence seq) { t = Arrays.Clone(Asn1OctetString.GetInstance(seq[0]).GetOctets()); |