import * as os from 'node:os'
+import { webcrypto } from 'node:crypto'
import type {
MeasurementStatisticsRequirements,
WorkerChoiceStrategyOptions
*
* @returns A number in the [0,1[ range
*/
-const secureRandom = (): number => {
- return crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
+export const secureRandom = (): number => {
+ return webcrypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
}