import { KVMap, RawMap } from './map'; export interface Encryptor { nonceSize(): number; encrypt(plaintext: Uint8Array, nonce: Uint8Array, aad?: Uint8Array): Promise; decrypt(ciphertext: Uint8Array, nonce: Uint8Array, aad?: Uint8Array): Promise; } export interface MACer { mac(message: Uint8Array, op?: number | string): Uint8Array; } export interface KeyWrapper { wrapKey(cek: Uint8Array): Uint8Array; unwrapKey(wrapped: Uint8Array): Uint8Array; } export interface Signer { sign(message: Uint8Array): Uint8Array; } export interface Verifier { verify(message: Uint8Array, signature: Uint8Array): boolean; } export interface ECDHer { ecdh(remotePublic: Key): Uint8Array; } export declare class Key extends KVMap { static fromBytes(data: Uint8Array): Key; constructor(kv?: RawMap); get kty(): number | string; set kty(kty: number); get kid(): Uint8Array; set kid(kid: Uint8Array); get alg(): number | string; set alg(alg: number | string); get ops(): (number | string)[]; set ops(ops: (number | string)[]); get baseIV(): Uint8Array; set baseIV(iv: Uint8Array); getKid(): T; setKid(kid: T): this; getSecret(): Uint8Array; verifyOps(...allowed: (number | string)[]): void; }