This source file includes following definitions.
- increment_
- increment_
- RandBytes
- RandUint64
- Reseed
- ChangeValue
#include "net/quic/test_tools/mock_random.h"
namespace net {
MockRandom::MockRandom()
: base_(0xDEADBEEF),
increment_(0) {
}
MockRandom::MockRandom(uint32 base)
: base_(base),
increment_(0) {
}
void MockRandom::RandBytes(void* data, size_t len) {
memset(data, 'r' + increment_, len);
}
uint64 MockRandom::RandUint64() {
return base_ + increment_;
}
void MockRandom::Reseed(const void* additional_entropy, size_t entropy_len) {
}
void MockRandom::ChangeValue() {
increment_++;
}
}