random.h 547 B

1234567891011121314151617181920212223242526
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2020-01-09 19:59:19
  5. * @LastEditTime: 2020-10-17 14:18:15
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. #ifndef _RANDOM_H_
  9. #define _RANDOM_H_
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #define RANDOM_MAX 0x7FFFFFFF
  14. int random_number(void);
  15. int random_number_range(unsigned int min, unsigned int max);
  16. char *random_string(unsigned int len);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif /* _RANDOM_H_ */