-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsencrypt-mp.d.ts
33 lines (31 loc) · 1.21 KB
/
jsencrypt-mp.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
declare class JSEncryptRSAKey {
constructor(key: string | object);
private parseKey(pem: string): void | boolean;
private getPrivateBaseKey(): string;
getPrivateBaseKeyB64(): string;
private getPublicBaseKey(): string;
getPublicBaseKeyB64(): string;
private wordwrap(str: string, width: number): string;
getPrivateKey(): string;
getPublicKey(): string;
private hasPublicKeyProperty(obj: object | {}): boolean;
private hasPrivateKeyProperty(obj: object | {}): boolean;
private parsePropertiesFrom(obj: object): void;
}
export default class JSEncrypt {
constructor(options?: object);
private readonly version: string;
readonly key: JSEncryptRSAKey | null;
setKey(key: object | string): void;
getKey(cb?: Function): JSEncryptRSAKey;
setPrivateKey(key: object | string): void;
getPrivateKey(): string;
getPrivateKeyB64(): string;
setPublicKey(key: object | string): void;
getPublicKey(): string;
getPublicKeyB64(): string;
encrypt(str: string): string | boolean;
decrypt(str: string): string | boolean;
sign(str: string, digestMethod: Function, digestName: string): string | boolean;
verify(str: string, signature: string, digestMethod: Function): boolean;
}