7 RAND_DRBG_get_ex_new_index
8 - store and retrieve extra data from the DRBG instance
12 #include <openssl/rand_drbg.h>
14 int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *data);
16 void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx);
18 int RAND_DRBG_get_ex_new_index(long argl, void *argp,
19 CRYPTO_EX_new *new_func,
20 CRYPTO_EX_dup *dup_func,
21 CRYPTO_EX_free *free_func);
27 RAND_DRBG_set_ex_data() enables an application to store arbitrary application
28 specific data B<data> in a RAND_DRBG instance B<drbg>. The index B<idx> should
29 be a value previously returned from a call to RAND_DRBG_get_ex_new_index().
31 RAND_DRBG_get_ex_data() retrieves application specific data previously stored
32 in an RAND_DRBG instance B<drbg>. The B<idx> value should be the same as that
33 used when originally storing the data.
35 For more detailed information see L<CRYPTO_get_ex_data(3)> and
36 L<CRYPTO_set_ex_data(3)> which implement these functions and
37 L<CRYPTO_get_ex_new_index(3)> for generating a unique index.
41 RAND_DRBG_set_ex_data() returns 1 for success or 0 for failure.
43 RAND_DRBG_get_ex_data() returns the previously stored value or NULL on
44 failure. NULL may also be a valid value.
49 RAND_DRBG_get_ex_new_index(...) is implemented as a macro and equivalent to
50 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG,...).
54 L<CRYPTO_get_ex_data(3)>,
55 L<CRYPTO_set_ex_data(3)>,
56 L<CRYPTO_get_ex_new_index(3)>,
61 Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
63 Licensed under the Apache License 2.0 (the "License"). You may not use
64 this file except in compliance with the License. You can obtain a copy
65 in the file LICENSE in the source distribution or at
66 L<https://www.openssl.org/source/license.html>.