moved rehash position in classic.cpp

This commit is contained in:
wangyu- 2017-09-15 04:12:00 -05:00
parent fc5cbc9b0c
commit f8efcaf48b

View File

@ -97,13 +97,14 @@ struct anti_replay_t
} }
void prepare() void prepare()
{ {
st.rehash(anti_replay_buff_size*10);
anti_replay_seq=get_true_random_number();//random first seq anti_replay_seq=get_true_random_number();//random first seq
const_id=get_true_random_number_nz(); const_id=get_true_random_number_nz();
} }
anti_replay_t() anti_replay_t()
{ {
memset(replay_buffer,0,sizeof(replay_buffer)); memset(replay_buffer,0,sizeof(replay_buffer));
st.rehash(anti_replay_buff_size*10);
max_packet_received=0; max_packet_received=0;
index=0; index=0;
} }