import { MessageListener } from '../communication-interface/MessageInterface';
import { TransportInterface } from '../communication-interface/TransportInterface';
import { DBFactory } from '../db/DBFactory';
/**
 * This class implements a message encryption scheme using RSA-OAEP and AES-CTR.
 * This class does not implement the messageInterface for semantic reasons as it does not guarantee integrity because messages are not signed.
 */
export declare class RsaOaepAesMessage {
    private dbFactory;
    private transport;
    private userId;
    private _initPromise;
    private rsaEncryptionKey?;
    private _nonceDao?;
    constructor(dbFactory: DBFactory, transport: TransportInterface, userId: string, rsaEncryptionKey?: string);
    init(rsaEncryptionKey?: string): Promise<void>;
    getRSAKey(): Promise<string>;
    encryptTo(userId: string, payload: string): Promise<string>;
    send(userId: string, payload: string): Promise<void>;
    decryptMessage(message: string): Promise<{
        from: string;
        payload: string;
    }>;
    messageReceived(message: string): Promise<void>;
    private messagelisteners;
    addMessageListener(listener: MessageListener): void;
    private addContactListeners;
    addAddContactListener(listener: (userId: string, keyInformation: string) => void): void;
    private contacts;
    addContact(userId: string, keyInformation: any, replaceExisting?: boolean): Promise<string | void>;
    private addContactAtomic;
    getKeyInformation(): Promise<string>;
    getOwnUserId(): Promise<string>;
}
//# sourceMappingURL=rsa-oaep-aes-message.d.ts.map