Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hpke/src/cipherSuiteNative.ts>CipherSuiteNative#open

A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.
Go to Latest
method CipherSuiteNative.prototype.open
import { CipherSuiteNative } from "https://deno.land/x/hpke@1.2.7/src/cipherSuiteNative.ts";

Decrypts a message from a sender.

If the error occurred, throws DecapError | DeserializeError | OpenError | ValidationError.

Parameters

A set of parameters for building a recipient encryption context.

ct: ArrayBuffer

An encrypted text as bytes to be decrypted.

optional
aad: ArrayBuffer = [UNSUPPORTED]

Additional authenticated data as bytes fed by an application.

Returns

Promise<ArrayBuffer>

A decrypted plain text as bytes.