bedrock-protocol/src/nethernet/util.js
2025-08-15 01:00:00 +01:00

10 lines
227 B
JavaScript

const getRandomUint64 = () => {
const high = Math.floor(Math.random() * 0xFFFFFFFF)
const low = Math.floor(Math.random() * 0xFFFFFFFF)
return (BigInt(high) << 32n) | BigInt(low)
}
module.exports = {
getRandomUint64
}