summaryrefslogtreecommitdiff
path: root/ext/node
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node')
-rw-r--r--ext/node/polyfills/crypto.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/node/polyfills/crypto.ts b/ext/node/polyfills/crypto.ts
index 7ea8800a7..db2e5c243 100644
--- a/ext/node/polyfills/crypto.ts
+++ b/ext/node/polyfills/crypto.ts
@@ -164,6 +164,10 @@ import { crypto as webcrypto } from "ext:deno_crypto/00_crypto.js";
const fipsForced = getOptionValue("--force-fips");
+function getRandomValues(typedArray) {
+ return webcrypto.getRandomValues(typedArray);
+}
+
function createCipheriv(
algorithm: CipherCCMTypes,
key: CipherKey,
@@ -332,6 +336,7 @@ export default {
diffieHellman,
DiffieHellmanGroup,
ECDH,
+ getRandomValues,
generateKey,
generateKeyPair,
generateKeyPairSync,
@@ -480,6 +485,7 @@ export {
getDiffieHellman,
getFips,
getHashes,
+ getRandomValues,
Hash,
hkdf,
hkdfSync,