random.h 654 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * @Author : jiejie
  3. * @GitHub : https://github.com/jiejieTop
  4. * @Date : 2021-02-26 12:00:24
  5. * @LastEditors : jiejie
  6. * @LastEditTime : 2022-06-15 19:40:10
  7. * @FilePath : /mqttclient/common/random.h
  8. * Copyright (c) 2022 jiejie, All Rights Reserved. Please keep the author information and source code according to the license.
  9. */
  10. #ifndef _RANDOM_H_
  11. #define _RANDOM_H_
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define RANDOM_MAX 0x7FFFFFFF
  16. int random_number(void);
  17. int random_number_range(unsigned int min, unsigned int max);
  18. int random_string(char *buffer, int len);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif /* _RANDOM_H_ */