summary refs log tree commit diff
path: root/crypto/src/cms/PasswordRecipientInfoGenerator.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-14 20:25:34 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-14 20:25:34 +0700
commitee97cb9053cced3ccfedd7ddf210579827859b6a (patch)
tree6c2c429ef86ff67a1926242e2bb15ac845fdf3bd /crypto/src/cms/PasswordRecipientInfoGenerator.cs
parentAvoid unnecessary recoding (diff)
downloadBouncyCastle.NET-ed25519-ee97cb9053cced3ccfedd7ddf210579827859b6a.tar.xz
Refactoring in Cms
Diffstat (limited to 'crypto/src/cms/PasswordRecipientInfoGenerator.cs')
-rw-r--r--crypto/src/cms/PasswordRecipientInfoGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/cms/PasswordRecipientInfoGenerator.cs b/crypto/src/cms/PasswordRecipientInfoGenerator.cs
index 9916edfc4..5bbf8f727 100644
--- a/crypto/src/cms/PasswordRecipientInfoGenerator.cs
+++ b/crypto/src/cms/PasswordRecipientInfoGenerator.cs
@@ -44,10 +44,10 @@ namespace Org.BouncyCastle.Cms
 			byte[] keyBytes = contentEncryptionKey.GetKey();
 
 			string rfc3211WrapperName = Helper.GetRfc3211WrapperName(keyEncryptionKeyOID);
-			IWrapper keyWrapper = Helper.CreateWrapper(rfc3211WrapperName);
+			IWrapper keyWrapper = WrapperUtilities.GetWrapper(rfc3211WrapperName);
 
 			// Note: In Java build, the IV is automatically generated in JCE layer
-			int ivLength = Platform.StartsWith(rfc3211WrapperName, "DESEDE") ? 8 : 16;
+			int ivLength = Platform.StartsWithIgnoreCase(rfc3211WrapperName, "DES") ? 8 : 16;
 			byte[] iv = new byte[ivLength];
 			random.NextBytes(iv);