Changeset 5617
- Timestamp:
- Jul 4, 2017 11:22:39 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_sdes.c
r5614 r5617 132 132 PJ_LOG(3,(THIS_FILE, "Warning: simple random generator is used " 133 133 "for generating SRTP key")); 134 for (i=0; i<crypto_suites[cs_idx].cipher_key_len; ++i) 135 key[i] = (char)(pj_rand() & 0xFF); 134 for (i=0; i<crypto_suites[cs_idx].cipher_key_len; ++i) { 135 pj_timestamp ts; 136 if (pj_rand() % 7 < 2) 137 pj_thread_sleep(pj_rand() % 11); 138 pj_get_timestamp(&ts); 139 key[i] = (char)((pj_rand() + ts.u32.lo) & 0xFF); 140 } 136 141 #endif 137 142
Note: See TracChangeset
for help on using the changeset viewer.