summary refs log tree commit diff
path: root/crypto/src/util
diff options
context:
space:
mode:
authorMegan Woods <megan@flygfisk.com>2019-01-14 00:17:24 +1100
committerMegan Woods <megan@flygfisk.com>2019-01-14 00:17:24 +1100
commit785d36daf1d125b3fba16e1d92719e2a0f67698e (patch)
tree2dfb561f0be1a55b87f135997d5d3c1e552c05da /crypto/src/util
parentFix some comments (diff)
downloadBouncyCastle.NET-ed25519-785d36daf1d125b3fba16e1d92719e2a0f67698e.tar.xz
Added ECGOST3410_2012Signer
Updated encoding of SubjectPublicKeyInfo and PrivateKeyInfo
Diffstat (limited to 'crypto/src/util')
-rw-r--r--crypto/src/util/BigIntegers.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/src/util/BigIntegers.cs b/crypto/src/util/BigIntegers.cs
index df78d1d86..6674750bb 100644
--- a/crypto/src/util/BigIntegers.cs
+++ b/crypto/src/util/BigIntegers.cs
@@ -46,6 +46,17 @@ namespace Org.BouncyCastle.Utilities
             return tmp;
         }
 
+        /// <summary>
+        /// Creates a Random BigInteger from the secure random of a given bit length.
+        /// </summary>
+        /// <param name="bitLength"></param>
+        /// <param name="secureRandom"></param>
+        /// <returns></returns>
+        public static BigInteger CreateRandomBigInteger(int bitLength, SecureRandom secureRandom)
+        {
+            return new BigInteger(bitLength, secureRandom);
+        }
+
         /**
         * Return a random BigInteger not less than 'min' and not greater than 'max'
         *