diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 11:01:05 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 11:01:05 +0700 |
commit | 18c67ac1339c9ca4f3604f5e5d44da0263b9ad21 (patch) | |
tree | 32fe34fa1251ddb8c5529d9a39a31a68641dd257 /crypto/src/cms/DefaultSignedAttributeTableGenerator.cs | |
parent | Generics migration in Bcpg, Bzip2, Cmp (diff) | |
download | BouncyCastle.NET-ed25519-18c67ac1339c9ca4f3604f5e5d44da0263b9ad21.tar.xz |
Generics migration in Cms
Diffstat (limited to 'crypto/src/cms/DefaultSignedAttributeTableGenerator.cs')
-rw-r--r-- | crypto/src/cms/DefaultSignedAttributeTableGenerator.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crypto/src/cms/DefaultSignedAttributeTableGenerator.cs b/crypto/src/cms/DefaultSignedAttributeTableGenerator.cs index 8d0bca083..e1bec484a 100644 --- a/crypto/src/cms/DefaultSignedAttributeTableGenerator.cs +++ b/crypto/src/cms/DefaultSignedAttributeTableGenerator.cs @@ -1,10 +1,8 @@ using System; -using System.Collections; using System.Collections.Generic; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Cms; -using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Cms { @@ -51,18 +49,20 @@ namespace Org.BouncyCastle.Cms * * @return a filled in Hashtable of attributes. */ - protected virtual IDictionary<DerObjectIdentifier, object> CreateStandardAttributeTable(IDictionary parameters) + protected virtual IDictionary<DerObjectIdentifier, object> CreateStandardAttributeTable( + IDictionary<CmsAttributeTableParameter, object> parameters) { var std = new Dictionary<DerObjectIdentifier, object>(m_table); DoCreateStandardAttributeTable(parameters, std); return std; } - private void DoCreateStandardAttributeTable(IDictionary parameters, + private void DoCreateStandardAttributeTable(IDictionary<CmsAttributeTableParameter, object> parameters, IDictionary<DerObjectIdentifier, object> std) { // contentType will be absent if we're trying to generate a counter signature. - if (parameters.Contains(CmsAttributeTableParameter.ContentType)) + + if (parameters.ContainsKey(CmsAttributeTableParameter.ContentType)) { if (!std.ContainsKey(CmsAttributes.ContentType)) { @@ -94,8 +94,7 @@ namespace Org.BouncyCastle.Cms * @param parameters source parameters * @return the populated attribute table */ - public virtual AttributeTable GetAttributes( - IDictionary parameters) + public virtual AttributeTable GetAttributes(IDictionary<CmsAttributeTableParameter, object> parameters) { var table = CreateStandardAttributeTable(parameters); return new AttributeTable(table); |