summary refs log tree commit diff
path: root/crypto/src/crmf/PKMacBuilder.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-23 17:36:05 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-23 17:36:05 +0700
commit6523b613d4a657b02da0777083116a2f5df55e98 (patch)
treecc49fe502a5d73648cad86b3ca2dfce73a8b9d28 /crypto/src/crmf/PKMacBuilder.cs
parentChange BigInteger arbitrary random source (diff)
downloadBouncyCastle.NET-ed25519-6523b613d4a657b02da0777083116a2f5df55e98.tar.xz
Complete SecureRandom refactoring
Diffstat (limited to 'crypto/src/crmf/PKMacBuilder.cs')
-rw-r--r--crypto/src/crmf/PKMacBuilder.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/src/crmf/PKMacBuilder.cs b/crypto/src/crmf/PKMacBuilder.cs
index bce26b825..ae9baa3d0 100644
--- a/crypto/src/crmf/PKMacBuilder.cs
+++ b/crypto/src/crmf/PKMacBuilder.cs
@@ -224,10 +224,7 @@ namespace Org.BouncyCastle.Crmf
 
             byte[] salt = new byte[saltLength];
 
-            if (random == null)
-            {
-                this.random = new SecureRandom();
-            }
+            this.random = CryptoServicesRegistrar.GetSecureRandom(random);
 
             random.NextBytes(salt);