diff options
author | David Hook <david.hook@keyfactor.com> | 2022-10-29 18:56:29 +1100 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2022-10-29 18:56:29 +1100 |
commit | 590610a1faf81601756bfc683154446802157c86 (patch) | |
tree | 871ef215c63025dfea08a4cdd99120ad8a07fa45 /crypto/src/cms/CMSAuthenticatedDataGenerator.cs | |
parent | Merge remote-tracking branch 'refs/remotes/origin/master' (diff) | |
parent | Release preparations (diff) | |
download | BouncyCastle.NET-ed25519-590610a1faf81601756bfc683154446802157c86.tar.xz |
resolve conflicts
Diffstat (limited to 'crypto/src/cms/CMSAuthenticatedDataGenerator.cs')
-rw-r--r-- | crypto/src/cms/CMSAuthenticatedDataGenerator.cs | 18 |
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); } |