diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-09-01 23:46:23 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-09-10 07:01:06 +0200 |
commit | 8faec1d33e19bf86e2a1131daa48736e91497b67 (patch) | |
tree | 498dfe3512e7ef929e24140df80a586061be54f8 /src/msg.h | |
parent | 7ba398c9019ee2cf2b0b93afe5428eacd77c60d4 (diff) |
Generate boundary by choosing a random character
Instead of rejecting random characters that are not in the boundary
character set, draw a random index and select the character at that
position. The probability distribution is not perfectly uniform with
this method, but reduces the number of calls to rand() by 4 times on
average.
Diffstat (limited to 'src/msg.h')
0 files changed, 0 insertions, 0 deletions