osrandom_engine.py 686 B

123456789101112131415161718192021222324
  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. import os
  6. HERE = os.path.dirname(os.path.abspath(__file__))
  7. with open(os.path.join(HERE, "src/osrandom_engine.h")) as f:
  8. INCLUDES = f.read()
  9. TYPES = """
  10. static const char *const Cryptography_osrandom_engine_name;
  11. static const char *const Cryptography_osrandom_engine_id;
  12. """
  13. FUNCTIONS = """
  14. int Cryptography_add_osrandom_engine(void);
  15. """
  16. with open(os.path.join(HERE, "src/osrandom_engine.c")) as f:
  17. CUSTOMIZATIONS = f.read()