rand.py 853 B

12345678910111213141516171819202122232425262728
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. from __future__ import absolute_import, division, print_function
  5. INCLUDES = """
  6. #include <openssl/rand.h>
  7. """
  8. TYPES = """
  9. typedef ... RAND_METHOD;
  10. """
  11. FUNCTIONS = """
  12. int RAND_set_rand_method(const RAND_METHOD *);
  13. void RAND_add(const void *, int, double);
  14. int RAND_status(void);
  15. int RAND_bytes(unsigned char *, int);
  16. /* ERR_load_RAND_strings started returning an int in 1.1.0. Unfortunately we
  17. can't declare a conditional signature like that. Since it always returns
  18. 1 we'll just lie about the signature to preserve compatibility for
  19. pyOpenSSL (which calls this in its rand.py as of mid-2016) */
  20. void ERR_load_RAND_strings(void);
  21. """
  22. CUSTOMIZATIONS = """
  23. """