Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.1/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>