]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/internal/man3/rand_bytes_ex.pod
Reorganize private crypto header files
[thirdparty/openssl.git] / doc / internal / man3 / rand_bytes_ex.pod
CommitLineData
6694e51d
MC
1=pod
2
3=head1 NAME
4
5rand_bytes_ex, rand_priv_bytes_ex
6- internal random number routines
7
8=head1 SYNOPSIS
9
25f2138b 10 #include "crypto/rand.h"
6694e51d
MC
11
12 int rand_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num);
13 int rand_priv_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num);
14
15=head1 DESCRIPTION
16
17rand_bytes_ex() and rand_priv_bytes_ex() are the equivalent of RAND_bytes() and
18RAND_priv_bytes() in the public API except that they both take an additional
dfabee82 19I<ctx> parameter.
6694e51d 20The DRBG used for the operation is the public or private DRBG associated with
dfabee82 21the specified I<ctx>. The parameter can be NULL, in which case
6694e51d
MC
22the default library ctx is used.
23If the default RAND_METHOD has been changed then for compatibility reasons the
24RAND_METHOD will be used in preference and the DRBG of the library context
25ignored.
26
27=head1 RETURN VALUES
28
29rand_bytes_ex() and rand_bytes_priv_ex() return 0 or less on error or 1 on
30success.
31
32=head1 COPYRIGHT
33
34Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
35
36Licensed under the Apache License 2.0 (the "License"). You may not use
37this file except in compliance with the License. You can obtain a copy
38in the file LICENSE in the source distribution or at
39L<https://www.openssl.org/source/license.html>.
40
41=cut