swc/crates/swc_bundler/tests/.cache/deno/23757f2a45edf09f858ba2b3dd6b3d1ca9908dc2.ts
2021-11-09 20:42:49 +09:00

11 lines
325 B
TypeScript

// Loaded from https://deno.land/x/mysql/src/auth_plugin/crypt.ts
import { RSA } from "https://deno.land/x/god_crypto@v0.2.0/mod.ts";
function encryptWithPublicKey(key: string, data: Uint8Array): Uint8Array {
const publicKey = RSA.parseKey(key);
return RSA.encrypt(data, publicKey);
}
export { encryptWithPublicKey };