1=pod 2 3=head1 NAME 4 5RAND_DRBG_set_ex_data, 6RAND_DRBG_get_ex_data, 7RAND_DRBG_get_ex_new_index 8- store and retrieve extra data from the DRBG instance 9 10=head1 SYNOPSIS 11 12 #include <openssl/rand_drbg.h> 13 14 int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *data); 15 16 void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx); 17 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); 22 23 24 25=head1 DESCRIPTION 26 27RAND_DRBG_set_ex_data() enables an application to store arbitrary application 28specific data B<data> in a RAND_DRBG instance B<drbg>. The index B<idx> should 29be a value previously returned from a call to RAND_DRBG_get_ex_new_index(). 30 31RAND_DRBG_get_ex_data() retrieves application specific data previously stored 32in an RAND_DRBG instance B<drbg>. The B<idx> value should be the same as that 33used when originally storing the data. 34 35For more detailed information see L<CRYPTO_get_ex_data(3)> and 36L<CRYPTO_set_ex_data(3)> which implement these functions and 37L<CRYPTO_get_ex_new_index(3)> for generating a unique index. 38 39=head1 RETURN VALUES 40 41RAND_DRBG_set_ex_data() returns 1 for success or 0 for failure. 42 43RAND_DRBG_get_ex_data() returns the previously stored value or NULL on 44failure. NULL may also be a valid value. 45 46 47=head1 NOTES 48 49RAND_DRBG_get_ex_new_index(...) is implemented as a macro and equivalent to 50CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG,...). 51 52=head1 SEE ALSO 53 54L<CRYPTO_get_ex_data(3)>, 55L<CRYPTO_set_ex_data(3)>, 56L<CRYPTO_get_ex_new_index(3)>, 57L<RAND_DRBG(7)> 58 59=head1 COPYRIGHT 60 61Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. 62 63Licensed under the OpenSSL license (the "License"). You may not use 64this file except in compliance with the License. You can obtain a copy 65in the file LICENSE in the source distribution or at 66L<https://www.openssl.org/source/license.html>. 67 68=cut 69