diff options
Diffstat (limited to 'crypto/src/asn1/cms/CmsAlgorithmProtection.cs')
-rw-r--r-- | crypto/src/asn1/cms/CmsAlgorithmProtection.cs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/crypto/src/asn1/cms/CmsAlgorithmProtection.cs b/crypto/src/asn1/cms/CmsAlgorithmProtection.cs index 9d21e53ff..cb7a23f84 100644 --- a/crypto/src/asn1/cms/CmsAlgorithmProtection.cs +++ b/crypto/src/asn1/cms/CmsAlgorithmProtection.cs @@ -23,6 +23,20 @@ namespace Org.BouncyCastle.Asn1.Cms public class CmsAlgorithmProtection : Asn1Encodable { + public static CmsAlgorithmProtection GetInstance(object obj) + { + if (obj == null) + return null; + if (obj is CmsAlgorithmProtection cmsAlgorithmProtection) + return cmsAlgorithmProtection; + return new CmsAlgorithmProtection(Asn1Sequence.GetInstance(obj)); + } + + public static CmsAlgorithmProtection GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return new CmsAlgorithmProtection(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); + } + public static readonly int Signature = 1; public static readonly int Mac = 2; @@ -78,15 +92,6 @@ namespace Org.BouncyCastle.Asn1.Cms } } - public static CmsAlgorithmProtection GetInstance(object obj) - { - if (obj == null) - return null; - if (obj is CmsAlgorithmProtection cmsAlgorithmProtection) - return cmsAlgorithmProtection; - return new CmsAlgorithmProtection(Asn1Sequence.GetInstance(obj)); - } - public AlgorithmIdentifier DigestAlgorithm => digestAlgorithm; public AlgorithmIdentifier MacAlgorithm => macAlgorithm; |