1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/websockets/websocket_test_util.h"
7 #include "base/basictypes.h"
13 (static_cast<uint64>(0x5851f42d) << 32) + static_cast<uint64>(0x4c957f2d);
14 const uint64 kC = 12345;
15 const uint64 kM = static_cast<uint64>(1) << 48;
19 LinearCongruentialGenerator::LinearCongruentialGenerator(uint32 seed)
22 uint32 LinearCongruentialGenerator::Generate() {
23 uint64 result = current_;
24 current_ = (current_ * kA + kC) % kM;
25 return static_cast<uint32>(result >> 16);