RAND_DRBG_set_ex_data.pod 1.9 KB

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