Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dtils/mod.unstable.ts>encryptAsymmetricallyUsingBytes

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

Asymmetrically encrypt plainBytes using publicKeyBytes. Function will error if publicKeyBytes is not an RSA public key

Parameters

publicKeyBytes: Uint8Array
plainBytes: Uint8Array

Returns

Promise<Uint8Array>