Skip to main content
Module

x/hpke/mod.ts>EncryptionContext

A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.
Latest
interface EncryptionContext
implements Exporter
import { type EncryptionContext } from "https://deno.land/x/hpke@1.2.7/mod.ts";

The encryption context interface for a recipient and a sender.

Methods

seal(data: ArrayBuffer, aad?: ArrayBuffer): Promise<ArrayBuffer>

Encrypts data.

If the error occurred, throws SealError | MessageLimitReachedError.

open(data: ArrayBuffer, aad?: ArrayBuffer): Promise<ArrayBuffer>

Decrypts data.

If the error occurred, throws OpenError.