randombytes_internal.h 672 B

1234567891011121314151617181920
  1. /*
  2. * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. # include "export.h"
  8. # include "randombytes.h"
  9. SODIUM_EXPORT
  10. extern const struct randombytes_implementation randombytes_esp32_implementation;
  11. /* Defining RANDOMBYTES_DEFAULT_IMPLEMENTATION here allows us to compile with the ESP32 hardware
  12. implementation as the default. No need to call randombytes_set_implementation().
  13. Doing it in the header like this is easier than passing it via a -D argument to gcc.
  14. */
  15. #undef RANDOMBYTES_DEFAULT_IMPLEMENTATION
  16. #define RANDOMBYTES_DEFAULT_IMPLEMENTATION &randombytes_esp32_implementation