()
| 670 | }; |
| 671 | |
| 672 | var initRandomFill = () => { |
| 673 | // This block is not needed on v19+ since crypto.getRandomValues is builtin |
| 674 | if (ENVIRONMENT_IS_NODE) { |
| 675 | var nodeCrypto = require('node:crypto'); |
| 676 | return (view) => nodeCrypto.randomFillSync(view); |
| 677 | } |
| 678 | |
| 679 | return (view) => crypto.getRandomValues(view); |
| 680 | }; |
| 681 | var randomFill = (view) => { |
| 682 | // Lazily init on the first invocation. |
| 683 | (randomFill = initRandomFill())(view); |