summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/doc/crypto/BN_rand.pod
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-02-18 03:17:36 +0000
committerkris <kris@FreeBSD.org>2001-02-18 03:17:36 +0000
commit7e55354aa4b06dead79c8a2c91756d71c0f02030 (patch)
tree5058ee297163944bfec8dbad8c8cad174f437d82 /crypto/openssl/doc/crypto/BN_rand.pod
parent539b977eff7c71f628cb2a407543a51070b14763 (diff)
downloadFreeBSD-src-7e55354aa4b06dead79c8a2c91756d71c0f02030.zip
FreeBSD-src-7e55354aa4b06dead79c8a2c91756d71c0f02030.tar.gz
Import of OpenSSL 0.9.6-STABLE snapshot dated 2001-02-10
Diffstat (limited to 'crypto/openssl/doc/crypto/BN_rand.pod')
-rw-r--r--crypto/openssl/doc/crypto/BN_rand.pod12
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/openssl/doc/crypto/BN_rand.pod b/crypto/openssl/doc/crypto/BN_rand.pod
index 33363c9..2a8bed5 100644
--- a/crypto/openssl/doc/crypto/BN_rand.pod
+++ b/crypto/openssl/doc/crypto/BN_rand.pod
@@ -12,6 +12,8 @@ BN_rand, BN_pseudo_rand - generate pseudo-random number
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
+ int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
+
=head1 DESCRIPTION
BN_rand() generates a cryptographically strong pseudo-random number of
@@ -25,11 +27,14 @@ this function are not necessarily unpredictable. They can be used for
non-cryptographic purposes and for certain purposes in cryptographic
protocols, but usually not for key generation etc.
-The PRNG must be seeded prior to calling BN_rand().
+BN_rand_range() generates a cryptographically strong pseudo-random
+number B<rnd> in the range 0 <lt>= B<rnd> E<lt> B<range>.
+
+The PRNG must be seeded prior to calling BN_rand() or BN_rand_range().
=head1 RETURN VALUES
-BN_rand() and BN_pseudo_rand() return 1 on success, 0 on error.
+The functions return 1 on success, 0 on error.
The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
=head1 SEE ALSO
@@ -40,6 +45,7 @@ L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)>
=head1 HISTORY
BN_rand() is available in all versions of SSLeay and OpenSSL.
-BN_pseudo_rand() was added in OpenSSL 0.9.5.
+BN_pseudo_rand() was added in OpenSSL 0.9.5, and BN_rand_range()
+in OpenSSL 0.9.6a.
=cut
OpenPOWER on IntegriCloud