Random prime number

后端 未结 6 1676
花落未央
花落未央 2020-12-30 03:58

How do I quickly generate a random prime number, that is for sure 1024 bit long?

6条回答
  •  攒了一身酷
    2020-12-30 04:25

    Use a library function, such as OpenSSL. There's no need to write this yourself.

    Example: http://ardoino.com/7-maths-openssl-primes-random/

提交回复
热议问题