diff options
Diffstat (limited to 'crypto/src/util/BigIntegers.cs')
-rw-r--r-- | crypto/src/util/BigIntegers.cs | 11 |
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' * |