rand.h 541 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright 2014-2022 The GmSSL Project. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the License); you may
  5. * not use this file except in compliance with the License.
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. */
  9. #ifndef GMSSL_RAND_H
  10. #define GMSSL_RAND_H
  11. #include <stdint.h>
  12. #include <stdlib.h>
  13. #include <gmssl/api.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /*
  18. Rand Public API
  19. rand_bytes
  20. */
  21. _gmssl_export int rand_bytes(uint8_t *buf, size_t buflen);
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25. #endif