Use the current system time to additionally randomize data.
| 94 | |
| 95 | // Use the current system time to additionally randomize data. |
| 96 | static void TimeRandomize(byte *RndBuf,size_t BufSize) |
| 97 | { |
| 98 | static uint Count=0; |
| 99 | RarTime CurTime; |
| 100 | CurTime.SetCurrentTime(); |
| 101 | uint64 Random=CurTime.GetWin()+clock(); |
| 102 | for (size_t I=0;I<BufSize;I++) |
| 103 | { |
| 104 | byte RndByte = byte (Random >> ( (I & 7) * 8 )); |
| 105 | RndBuf[I]=byte( (RndByte ^ I) + Count++); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | |
| 110 |
no test coverage detected