diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-11-09 09:56:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 23:26:59 +0530 |
commit | c4029f6af22b373bf22383453cb4e2159f3b5b72 (patch) | |
tree | 588594d5d5eb98689101565fb76c6a546cc9e78a /ext/node/polyfills/internal/crypto/cipher.ts | |
parent | ee7fd0a2127e6a435023bf9a43de60130117697d (diff) |
fix(node): implement createPrivateKey (#20981)
Towards #18455
Diffstat (limited to 'ext/node/polyfills/internal/crypto/cipher.ts')
-rw-r--r-- | ext/node/polyfills/internal/crypto/cipher.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/crypto/cipher.ts b/ext/node/polyfills/internal/crypto/cipher.ts index cf1641326..5fec98ff0 100644 --- a/ext/node/polyfills/internal/crypto/cipher.ts +++ b/ext/node/polyfills/internal/crypto/cipher.ts @@ -28,7 +28,7 @@ import { isArrayBufferView, } from "ext:deno_node/internal/util/types.ts"; -function isStringOrBuffer(val) { +export function isStringOrBuffer(val) { return typeof val === "string" || isArrayBufferView(val) || isAnyArrayBuffer(val); @@ -456,7 +456,7 @@ export function publicEncrypt( return ops.op_node_public_encrypt(data, buffer, padding); } -function prepareKey(key) { +export function prepareKey(key) { // TODO(@littledivy): handle these cases // - node KeyObject // - web CryptoKey @@ -485,5 +485,6 @@ export default { publicEncrypt, Cipheriv, Decipheriv, + prepareKey, getCipherInfo, }; |