1 2 /* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7 #ifndef _NXT_RANDOM_H_INCLUDED_ 8 #define _NXT_RANDOM_H_INCLUDED_ 9 10 11 typedef struct { 12 uint8_t i; 13 uint8_t j; 14 uint8_t s[256]; 15 int32_t count; 16 } nxt_random_t; 17 18 19 void nxt_random_init(nxt_random_t *r); 20 uint32_t nxt_random(nxt_random_t *r); 21 22 #if (NXT_LIB_UNIT_TEST) 23 nxt_int_t nxt_random_unit_test(nxt_thread_t *thr); 24 #endif 25 26 27 #endif /* _NXT_RANDOM_H_INCLUDED_ */ 28