-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypesForBundle.d.ts
More file actions
82 lines (74 loc) · 2.68 KB
/
Copy pathTypesForBundle.d.ts
File metadata and controls
82 lines (74 loc) · 2.68 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
declare class LibCryptPass {
static ConfigCryptPass: new(obj: StdWriters, KeyPassObj?: {}, SequenceObj?: {}) => ConfigCryptPass;
static CryptPass: new(password: string, obj: StdWriters, KeyPassObj?: {}, SequenceObj?: {}) => CryptPass;
static CryptPassCached: new(obj: StdWriters, KeyPassObj?: {}, SequenceObj?: {}) => CryptPassCached;
}
declare class ConfigCryptPass {
private _SM;
private _KPM;
getLastChange(): Date;
restoreSeq(sequence: number[]): Promise<boolean>;
getSequence(): number[];
initSeqAndKey(password: string): Promise<boolean>;
refreshSequence(password: string): Promise<boolean>;
checkPwd(password: string): boolean;
chPwd(oldPassword: string, newPassword: string): Promise<boolean>;
constructor(ObjRW: StdWriters, KeyPassObj?: {}, SequenceObj?: {});
}
interface StdWriters {
SequenceWriter: ObjWriter;
KeyPassWriter: ObjWriter;
}
declare class CryptPass {
private _Password;
private _KPM;
constructor(password: string, ObjRW: StdWriters, KeyPassObj?: {}, SequenceObj?: {});
getPassDescription(): string;
setPassDescription(description: string): Promise<boolean>;
addEntry(entry: EntryView): Promise<boolean>;
getEntry(name: string): false | EntryView;
getEntryNames(): string[];
updateEntry(entry: EntryView): Promise<boolean>;
updateEntryName(oldName: string, newName: string): Promise<boolean>;
deleteEntry(name: string): Promise<boolean>;
}
declare class CryptPassCached {
private _KPM;
constructor(ObjRW: StdWriters, KeyPassObj?: {}, SequenceObj?: {});
getPassDescription(): string;
setPassDescription(description: string): Promise<boolean>;
SetEntries(entries: Entries, passwordOrK: string, isK?: boolean): Promise<boolean>;
GetEntriesManage(passwordOrK: string, isK?: boolean): EntriesManage;
GetK(password: string): string | false;
}
declare type Entries = {
[Name: string]: EntryView;
};
declare class EntriesManage {
private _entries;
constructor(entries: Entries);
set Entries(entries: Entries);
GetEntryNames(): string[];
GetEntry(Name: string): EntryView | false;
UpdateEntryName(Name: string, NewName: string): boolean;
UpdateEntry(Value: EntryView): boolean;
DeleteEntry(Name: string): boolean;
AddEntry(Value: EntryView): boolean;
Export(): Entries;
}
declare type ObjWriter = (Obj: {}, KeepBackup?: boolean) => boolean | Promise<boolean>;
interface EntryValue {
Description?: string;
Tags?: string;
Username?: string;
Password?: string;
PIN?: string;
Other?: {
[Name: string]: string;
};
}
interface EntryView extends EntryValue {
Name?: string;
Date?: Date;
DateStr?: string;
}