diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-04 12:04:27 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-04 12:04:27 +0700 |
commit | 2446ee5e5a03f864ab8fde48bc9c4c1f133f9271 (patch) | |
tree | 3680f45b5f9d04835b4989b01a547af4d215db08 /crypto/src/cms/CMSEnvelopedHelper.cs | |
parent | Update CryptoProObjectIdentifiers (diff) | |
download | BouncyCastle.NET-ed25519-2446ee5e5a03f864ab8fde48bc9c4c1f133f9271.tar.xz |
Refactoring
Diffstat (limited to 'crypto/src/cms/CMSEnvelopedHelper.cs')
-rw-r--r-- | crypto/src/cms/CMSEnvelopedHelper.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/src/cms/CMSEnvelopedHelper.cs b/crypto/src/cms/CMSEnvelopedHelper.cs index 91f5ab910..86baa3642 100644 --- a/crypto/src/cms/CMSEnvelopedHelper.cs +++ b/crypto/src/cms/CMSEnvelopedHelper.cs @@ -114,21 +114,21 @@ namespace Org.BouncyCastle.Cms CmsSecureReadable secureReadable) { Asn1Encodable recipInfo = info.Info; - if (recipInfo is KeyTransRecipientInfo) + if (recipInfo is KeyTransRecipientInfo keyTransRecipientInfo) { - infos.Add(new KeyTransRecipientInformation((KeyTransRecipientInfo)recipInfo, secureReadable)); + infos.Add(new KeyTransRecipientInformation(keyTransRecipientInfo, secureReadable)); } - else if (recipInfo is KekRecipientInfo) + else if (recipInfo is KekRecipientInfo kekRecipientInfo) { - infos.Add(new KekRecipientInformation((KekRecipientInfo)recipInfo, secureReadable)); + infos.Add(new KekRecipientInformation(kekRecipientInfo, secureReadable)); } - else if (recipInfo is KeyAgreeRecipientInfo) + else if (recipInfo is KeyAgreeRecipientInfo keyAgreeRecipientInfo) { - KeyAgreeRecipientInformation.ReadRecipientInfo(infos, (KeyAgreeRecipientInfo)recipInfo, secureReadable); + KeyAgreeRecipientInformation.ReadRecipientInfo(infos, keyAgreeRecipientInfo, secureReadable); } - else if (recipInfo is PasswordRecipientInfo) + else if (recipInfo is PasswordRecipientInfo passwordRecipientInfo) { - infos.Add(new PasswordRecipientInformation((PasswordRecipientInfo)recipInfo, secureReadable)); + infos.Add(new PasswordRecipientInformation(passwordRecipientInfo, secureReadable)); } } |