summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/crypto/keys.ts
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-03-14 06:39:46 -0700
committerGitHub <noreply@github.com>2024-03-14 14:39:46 +0100
commit9c348a0acd7d1bc288c2ce5b66016571b9603288 (patch)
tree631f24c5d2093e472eb6209ca6609702f0261fd4 /ext/node/polyfills/internal/crypto/keys.ts
parentcf3c6f9b0812ad487320834399bc4863dadd9655 (diff)
fix(ext/node): support `spki` format in createPublicKey (#22918)
Diffstat (limited to 'ext/node/polyfills/internal/crypto/keys.ts')
-rw-r--r--ext/node/polyfills/internal/crypto/keys.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts
index 33034d824..74379015b 100644
--- a/ext/node/polyfills/internal/crypto/keys.ts
+++ b/ext/node/polyfills/internal/crypto/keys.ts
@@ -66,7 +66,7 @@ export const getArrayBufferOrView = hideStackFrames(
| Uint16Array
| Uint32Array => {
if (isAnyArrayBuffer(buffer)) {
- return buffer;
+ return new Uint8Array(buffer);
}
if (typeof buffer === "string") {
if (encoding === "buffer") {