net: fix nonce creation.
This commit is contained in:
parent
25da26c415
commit
0977c5c133
@ -167,8 +167,8 @@ exports.BAN_SCORE = 100;
|
|||||||
|
|
||||||
exports.nonce = function nonce() {
|
exports.nonce = function nonce() {
|
||||||
const data = Buffer.allocUnsafe(8);
|
const data = Buffer.allocUnsafe(8);
|
||||||
data.writeUInt32LE(Math.random() * 0x100000000, true, 0);
|
data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 0, true);
|
||||||
data.writeUInt32LE(Math.random() * 0x100000000, true, 4);
|
data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 4, true);
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user