Skip to main content
Module

x/dtils/mod.unstable.ts>encryptAsymmetrically

The best unofficial library of utilities for Deno applications
Go to Latest
function encryptAsymmetrically
import { encryptAsymmetrically } from "https://deno.land/x/dtils@2.2.0/mod.unstable.ts";

Asymmetrically encrypt plainBytes using a base64 encoded publicKey. Function will error if publicKey is not an RSA public key

Parameters

publicKey: string
plainBytes: Uint8Array

Returns

Promise<Uint8Array>