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

10 lines (9 loc) 659 B
export interface Kdf { extract(salt: Uint8Array, ikm: Uint8Array): Promise<Uint8Array>; expand(prk: Uint8Array, info: Uint8Array, len: number): Promise<Uint8Array>; size: number; } export type KdfAlgorithm = "HKDF-SHA256" | "HKDF-SHA384" | "HKDF-SHA512"; export declare function expandWithLabel(secret: Uint8Array, label: string, context: Uint8Array, length: number, kdf: Kdf): Promise<Uint8Array>; export declare function deriveSecret(secret: Uint8Array, label: string, kdf: Kdf): Promise<Uint8Array>; export declare function deriveTreeSecret(secret: Uint8Array, label: string, generation: number, length: number, kdf: Kdf): Promise<Uint8Array>;