/// <summary> /// Generates a prime number /// </summary> /// <param name="bits">Number of bits the resulting prime should have</param> /// <returns>Generated prime</returns> public static BigNumber GeneratePrime(int bits) { IntPtr res = OpenSSL.BN_new(); OpenSSL.BN_generate_prime(res, bits, Convert.ToInt32(true), IntPtr.Zero, IntPtr.Zero, null, IntPtr.Zero); return(new BigNumber(res)); }