| 385 | } |
| 386 | |
| 387 | uint256 FastRandomContext::rand256() |
| 388 | { |
| 389 | if (bytebuf_size < 32) { |
| 390 | FillByteBuffer(); |
| 391 | } |
| 392 | uint256 ret; |
| 393 | memcpy(ret.begin(), bytebuf + 64 - bytebuf_size, 32); |
| 394 | bytebuf_size -= 32; |
| 395 | return ret; |
| 396 | } |
| 397 | |
| 398 | std::vector<unsigned char> FastRandomContext::randbytes(size_t len) |
| 399 | { |