-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathindex.d.ts
More file actions
27 lines (20 loc) · 626 Bytes
/
index.d.ts
File metadata and controls
27 lines (20 loc) · 626 Bytes
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
declare class Cryptr {
constructor(
secret: string,
options?: { pbkdf2Iterations?: number; saltLength?: number; encoding?: 'hex' | 'base64' | 'latin1' },
);
encrypt(value: string): string;
decrypt(value: string): string;
}
declare class CryptrAsync {
constructor(
secret: string,
options?: { pbkdf2Iterations?: number; saltLength?: number; encoding?: 'hex' | 'base64' | 'latin1' },
);
async encrypt(value: string): Promise<string>;
async decrypt(value: string): Promise<string>;
}
declare namespace Cryptr {
export { CryptrAsync };
}
export = Cryptr;