diff options
Diffstat (limited to 'ext/node/polyfills/_crypto/crypto_browserify/public_encrypt/mod.js')
| -rw-r--r-- | ext/node/polyfills/_crypto/crypto_browserify/public_encrypt/mod.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/node/polyfills/_crypto/crypto_browserify/public_encrypt/mod.js b/ext/node/polyfills/_crypto/crypto_browserify/public_encrypt/mod.js new file mode 100644 index 000000000..a91197aef --- /dev/null +++ b/ext/node/polyfills/_crypto/crypto_browserify/public_encrypt/mod.js @@ -0,0 +1,15 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +// Copyright 2017 Calvin Metcalf. All rights reserved. MIT license. + +import { publicEncrypt } from "internal:deno_node/polyfills/_crypto/crypto_browserify/public_encrypt/public_encrypt.js"; +import { privateDecrypt } from "internal:deno_node/polyfills/_crypto/crypto_browserify/public_encrypt/private_decrypt.js"; + +export { privateDecrypt, publicEncrypt }; + +export function privateEncrypt(key, buf) { + return publicEncrypt(key, buf, true); +} + +export function publicDecrypt(key, buf) { + return privateDecrypt(key, buf, true); +} |
