diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-22 18:56:36 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 18:56:36 +0530 |
commit | 22eec2b3cfcb0341e1b28329dbf82a40e66a672a (patch) | |
tree | 905b790a30781c245b8d8e4d5bd038c6ae8c4f71 /ext | |
parent | eb9d473974fe5cf314982539c942b96b795df696 (diff) |
fix(ext/node): add crypto.subtle (#23027)
Alias for `crypto.webcrypto.subtle`.
https://nodejs.org/api/crypto.html#cryptosubtle
Diffstat (limited to 'ext')
-rw-r--r-- | ext/node/polyfills/crypto.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/node/polyfills/crypto.ts b/ext/node/polyfills/crypto.ts index db2e5c243..908d21b00 100644 --- a/ext/node/polyfills/crypto.ts +++ b/ext/node/polyfills/crypto.ts @@ -162,6 +162,7 @@ import type { } from "ext:deno_node/_stream.d.ts"; import { crypto as webcrypto } from "ext:deno_crypto/00_crypto.js"; +const subtle = webcrypto.subtle; const fipsForced = getOptionValue("--force-fips"); function getRandomValues(typedArray) { @@ -377,6 +378,7 @@ export default { Verify, verify, webcrypto, + subtle, X509Certificate, }; @@ -511,6 +513,7 @@ export { setFips, Sign, sign, + subtle, timingSafeEqual, Verify, verify, |