summary refs log tree commit diff
path: root/crypto/src/cms/CMSAuthenticatedDataGenerator.cs
diff options
context:
space:
mode:
authorDavid Hook <david.hook@keyfactor.com>2022-10-29 18:56:29 +1100
committerDavid Hook <david.hook@keyfactor.com>2022-10-29 18:56:29 +1100
commit590610a1faf81601756bfc683154446802157c86 (patch)
tree871ef215c63025dfea08a4cdd99120ad8a07fa45 /crypto/src/cms/CMSAuthenticatedDataGenerator.cs
parentMerge remote-tracking branch 'refs/remotes/origin/master' (diff)
parentRelease preparations (diff)
downloadBouncyCastle.NET-ed25519-590610a1faf81601756bfc683154446802157c86.tar.xz
resolve conflicts
Diffstat (limited to 'crypto/src/cms/CMSAuthenticatedDataGenerator.cs')
-rw-r--r--crypto/src/cms/CMSAuthenticatedDataGenerator.cs18
1 files changed, 6 insertions, 12 deletions
diff --git a/crypto/src/cms/CMSAuthenticatedDataGenerator.cs b/crypto/src/cms/CMSAuthenticatedDataGenerator.cs
index 9bfabe8b1..6c68bccd1 100644
--- a/crypto/src/cms/CMSAuthenticatedDataGenerator.cs
+++ b/crypto/src/cms/CMSAuthenticatedDataGenerator.cs
@@ -29,20 +29,14 @@ namespace Org.BouncyCastle.Cms
 	public class CmsAuthenticatedDataGenerator
 	    : CmsAuthenticatedGenerator
 	{
-	    /**
-	     * base constructor
-	     */
 	    public CmsAuthenticatedDataGenerator()
 	    {
 	    }
 
-	    /**
-	     * constructor allowing specific source of randomness
-	     * @param rand instance of SecureRandom to use
-	     */
-	    public CmsAuthenticatedDataGenerator(
-	        SecureRandom rand)
-	        : base(rand)
+        /// <summary>Constructor allowing specific source of randomness</summary>
+        /// <param name="random">Instance of <c>SecureRandom</c> to use.</param>
+	    public CmsAuthenticatedDataGenerator(SecureRandom random)
+	        : base(random)
 	    {
 	    }
 
@@ -109,7 +103,7 @@ namespace Org.BouncyCastle.Cms
 			{
 				try
 				{
-					recipientInfos.Add(rig.Generate(encKey, rand));
+					recipientInfos.Add(rig.Generate(encKey, m_random));
 				}
 				catch (InvalidKeyException e)
 				{
@@ -142,7 +136,7 @@ namespace Org.BouncyCastle.Cms
 				// FIXME Will this work for macs?
 				CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
 
-				keyGen.Init(new KeyGenerationParameters(rand, keyGen.DefaultStrength));
+				keyGen.Init(new KeyGenerationParameters(m_random, keyGen.DefaultStrength));
 
 				return Generate(content, encryptionOid, keyGen);
             }