summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/crypto/keybackup.d.ts
blob: 3e46e9eba1a2659f937c4ae39b02ad98432f6efd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { ISigned } from "../@types/signed";
import { IEncryptedPayload } from "./aes";
export interface Curve25519SessionData {
    ciphertext: string;
    ephemeral: string;
    mac: string;
}
export interface IKeyBackupSession<T = Curve25519SessionData | IEncryptedPayload> {
    first_message_index: number;
    forwarded_count: number;
    is_verified: boolean;
    session_data: T;
}
export interface IKeyBackupRoomSessions {
    [sessionId: string]: IKeyBackupSession;
}
export interface ICurve25519AuthData {
    public_key: string;
    private_key_salt?: string;
    private_key_iterations?: number;
    private_key_bits?: number;
}
export interface IAes256AuthData {
    iv: string;
    mac: string;
    private_key_salt?: string;
    private_key_iterations?: number;
}
export interface IKeyBackupInfo {
    algorithm: string;
    auth_data: ISigned & (ICurve25519AuthData | IAes256AuthData);
    count?: number;
    etag?: string;
    version?: string;
}
export interface IKeyBackupPrepareOpts {
    /**
     * Whether to use Secure Secret Storage to store the key encrypting key backups.
     * Optional, defaults to false.
     */
    secureSecretStorage: boolean;
}
export interface IKeyBackupRestoreResult {
    total: number;
    imported: number;
}
export interface IKeyBackupRestoreOpts {
    cacheCompleteCallback?: () => void;
    progressCallback?: (progress: {
        stage: string;
    }) => void;
}
//# sourceMappingURL=keybackup.d.ts.map