X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils.ts;h=5a685439ed7725c0bc305df5d86af2f670a5a9a3;hb=f11ec29c7cd99ccf56c1702901afbfb4ae9c1216;hp=a0a9e530131cbe78df7401dff80452eef16e8634;hpb=d91689fda0fa7a85014ac25276cf2cf0a9d81ce2;p=poolifier.git diff --git a/src/utils.ts b/src/utils.ts index a0a9e530..5a685439 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ import * as os from 'node:os' -import { webcrypto } from 'node:crypto' +import { getRandomValues } from 'node:crypto' import { Worker as ClusterWorker } from 'node:cluster' import { Worker as ThreadWorker } from 'node:worker_threads' import type { @@ -226,7 +226,7 @@ export const isAsyncFunction = ( * @internal */ export const secureRandom = (): number => { - return webcrypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000 + return getRandomValues(new Uint32Array(1))[0] / 0x100000000 } /**