net: fix nonce creation.

This commit is contained in:
Christopher Jeffrey 2018-06-08 04:16:59 -07:00
parent 25da26c415
commit 0977c5c133
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -167,8 +167,8 @@ exports.BAN_SCORE = 100;
exports.nonce = function nonce() {
const data = Buffer.allocUnsafe(8);
data.writeUInt32LE(Math.random() * 0x100000000, true, 0);
data.writeUInt32LE(Math.random() * 0x100000000, true, 4);
data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 0, true);
data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 4, true);
return data;
};