-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.d.ts
47 lines (38 loc) · 1.17 KB
/
index.d.ts
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
/**
* @author zurmokeeper
* @time 2023-5-27
* github home page https://github.com/zurmokeeper/officecrypto-tool
*/
export = officeCrypto;
declare namespace officeCrypto{
interface Options {
/**
* @desc Encrypted/Decrypted passwords, maximum length is 255
* required
*/
password: string;
/**
* @desc Encryption Type
* optional
*/
type?: 'standard';
}
/**
*
* @param input The buffer to be encrypted
* @param options
* @description encryption methods,For the time being only support ecma376 agile and ecma376 standard
*/
function encrypt(input: Buffer, options: Options): Buffer;
/**
* @param input The encrypted buffer
* @param options
* @description decryption methods,For the time being only support ecma376 agile
*/
function decrypt(input: Buffer, options: Options): Promise<Buffer>;
/**
* @param input Input buffer
* @description Determine whether excel file is encrypted or not, support xls and xlsx format, encrypted is true, not encrypted is false.
*/
function isEncrypted(input: Buffer): boolean;
}