UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

9 lines (8 loc) 476 B
import { AeadInterface } from "@hpke/core"; export type AeadAlgorithm = "AES128GCM" | "CHACHA20POLY1305" | "AES256GCM"; export interface Aead { hpkeInterface(): AeadInterface; encrypt(key: Uint8Array, nonce: Uint8Array, aad: Uint8Array, plaintext: Uint8Array): Promise<Uint8Array>; decrypt(key: Uint8Array, nonce: Uint8Array, aad: Uint8Array, ciphertext: Uint8Array): Promise<Uint8Array>; } export declare function makeAead(aeadAlg: AeadAlgorithm): Promise<Aead>;