import type { Exporter } from "./exporter.js";
/**
 * The encryption context interface for a recipient and a sender.
 */
export interface EncryptionContext extends Exporter {
    /**
     * Encrypts data.
     *
     * If the error occurred, throws `SealError` | `MessageLimitReachedError`.
     *
     * @param data A plain text as bytes to be encrypted.
     * @param aad Additional authenticated data as bytes fed by an application.
     * @returns A cipher text as bytes.
     * @throws {@link MessageLimitReachedError}, {@link SealError}
     */
    seal(data: ArrayBufferLike | ArrayBufferView, aad?: ArrayBufferLike | ArrayBufferView): Promise<ArrayBuffer>;
    /**
     * Decrypts data.
     *
     * If the error occurred, throws `OpenError`.
     *
     * @param data An encrypted text as bytes to be decrypted.
     * @param aad Additional authenticated data as bytes fed by an application.
     * @returns A decrypted plain text as bytes.
     * @throws {@link OpenError}
     */
    open(data: ArrayBufferLike | ArrayBufferView, aad?: ArrayBufferLike | ArrayBufferView): Promise<ArrayBuffer>;
}
/**
 * The recipient encryption context.
 */
export type RecipientContext = EncryptionContext;
/**
 * The sender encryption context.
 */
export interface SenderContext extends EncryptionContext {
    /** The encapsulated key generated by the sender. */
    enc: ArrayBuffer;
}
//# sourceMappingURL=encryptionContext.d.ts.map