UNPKG

e2ee-ts

Version:

A module that provides RSA & AES encryption interfaces

27 lines 925 B
/// <reference types="node" /> import { BufferSource } from "stream/web"; export declare class AESClient { private _key; constructor(); init(): Promise<void>; /** * Exports this object's public key so that the client can * encrypt their data using this person's public key */ exportKey(): Promise<ArrayBuffer>; /** * Loads the ArrayBuffer representing the key * to this object, can only be used to decrypt */ importBufferKey(bufferKey: ArrayBuffer): Promise<void>; /** * Encrypts BufferSource using the secret key */ encrypt(data: BufferSource, tagLength?: AESTagLength): Promise<AESEncrypt>; /** * Decrypts ArrayBuffer using the secret key */ decrypt(data: ArrayBuffer, iv: Uint8Array, tagLength?: AESTagLength): Promise<ArrayBuffer>; arrayBufferToString(buffer: ArrayBuffer): string; } //# sourceMappingURL=AESClient.d.ts.map