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-07-26 13:47:16 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-26 13:47:16 +0700
commit8ce8a4d09d8e6cfb29e8ecbb96a354a3eed9c321 (patch)
treec367281f28b5a082f32f1e0d77d6a22d6b7cd779 /crypto/src/cms/PasswordRecipientInfoGenerator.cs
parentCreate new API for algorithm finders (diff)
downloadBouncyCastle.NET-ed25519-8ce8a4d09d8e6cfb29e8ecbb96a354a3eed9c321.tar.xz
Refactor CMS helpers
Diffstat (limited to 'crypto/src/cms/PasswordRecipientInfoGenerator.cs')
-rw-r--r--crypto/src/cms/PasswordRecipientInfoGenerator.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/src/cms/PasswordRecipientInfoGenerator.cs b/crypto/src/cms/PasswordRecipientInfoGenerator.cs
index 1243bea9f..d3faa1bf0 100644
--- a/crypto/src/cms/PasswordRecipientInfoGenerator.cs
+++ b/crypto/src/cms/PasswordRecipientInfoGenerator.cs
@@ -11,10 +11,9 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Cms
 {
-	internal class PasswordRecipientInfoGenerator : RecipientInfoGenerator
+	internal class PasswordRecipientInfoGenerator
+		: RecipientInfoGenerator
 	{
-		private static readonly CmsEnvelopedHelper Helper = CmsEnvelopedHelper.Instance;
-
 		private AlgorithmIdentifier	keyDerivationAlgorithm;
 		private KeyParameter		keyEncryptionKey;
 		// TODO Can get this from keyEncryptionKey?		
@@ -43,7 +42,7 @@ namespace Org.BouncyCastle.Cms
 		{
 			byte[] keyBytes = contentEncryptionKey.GetKey();
 
-			string rfc3211WrapperName = Helper.GetRfc3211WrapperName(keyEncryptionKeyOID);
+			string rfc3211WrapperName = CmsEnvelopedHelper.GetRfc3211WrapperName(keyEncryptionKeyOID);
 			IWrapper keyWrapper = WrapperUtilities.GetWrapper(rfc3211WrapperName);
 
 			// Note: In Java build, the IV is automatically generated in JCE layer