10 lines
227 B
JavaScript
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
|
|
}
|