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