| 438 | } |
| 439 | |
| 440 | void entropy_add_block(const uchar *s, int len) |
| 441 | { |
| 442 | for( ; len > 0; s += 128, len -= 128) |
| 443 | { |
| 444 | int bl = min(len, 128); |
| 445 | xor_block(entpool + rnd(ENTPOOLSIZE / 8 - 16) * 8, s, bl); // use pseudorandom to mix entropy into the pool in a hard to predict fashion |
| 446 | mix_block(entpool + rnd(ENTPOOLSIZE - bl), s, bl); |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | void entropy_get(uchar *buf, int len) |
| 451 | { |
no test coverage detected