-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcadescom_async.d.ts
107 lines (99 loc) · 5.04 KB
/
cadescom_async.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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
declare namespace CAdESCOM {
interface CPSignerAsync {
readonly Certificate: Promise<CAPICOM.ICertificateAsync>;
propset_Certificate(certificate: CAPICOM.ICertificateAsync): Promise<void>;
Display(hwndParent?: number, title?: string): Promise<void>;
Load(fileName: string, password?: string): Promise<void>;
//AuthenticatedAttributes
//AuthenticatedAttributes2
//Chain
readonly CheckCertificate: Promise<boolean>;
propset_CheckCertificate(checkCertificate: boolean): Promise<void>;
//CRLs;
readonly KeyPin: Promise<string>;
propset_KeyPin(keyPin: string): Promise<void>
//OCSPResponses
readonly Options: Promise<CAPICOM.CAPICOM_CERTIFICATE_INCLUDE_OPTION>;
propset_Options(options: CAPICOM.CAPICOM_CERTIFICATE_INCLUDE_OPTION): Promise<void>
//SignatureStatus
readonly SignatureTimeStampTime: Promise<VarDate>;
readonly SigningTime: Promise<VarDate>;
readonly TSAAddress: Promise<string>;
propset_TSAAddress(TSAAddress: string): Promise<void>;
//UnauthenticatedAttributes
}
interface CadesSignedDataAsync {
Display(hwndParent?: number, title?: string): Promise<void>;
EnhanceCades(cadesType?: CADESCOM_CADES_TYPE, TSAAddress?: string, encodingType?: CAPICOM.CAPICOM_ENCODING_TYPE): Promise<string>;
//Sign
//SignHash
//Verify
//VerifyHash
readonly Certificates: Promise<CAPICOM.ICertificates>;
readonly DisplayData: Promise<CADESCOM_DISPLAY_DATA>;
propset_DisplayData(displayData: CADESCOM_DISPLAY_DATA): Promise<void>;
//Signers
readonly Content: Promise<string>;
propset_Content(content: string): Promise<void>;
readonly ContentEncoding: Promise<CADESCOM_CONTENT_ENCODING_TYPE>;
propset_ContentEncoding(contentEncoding: CADESCOM_CONTENT_ENCODING_TYPE): Promise<void>;
SignCades(signer?: CPSignerAsync, CadesType?: CADESCOM_CADES_TYPE, bDetached?: boolean, EncodingType?: CAPICOM.CAPICOM_ENCODING_TYPE): Promise<string>
VerifyCades(SignedMessage: string, CadesType?: CADESCOM_CADES_TYPE, bDetached?: boolean): Promise<void>;
}
interface VersionAsync {
toString(): Promise<string>;
readonly BuildVersion: Promise<number>;
readonly MajorVersion: Promise<number>;
readonly MinorVersion: Promise<number>;
readonly toStringDefault: Promise<string>;
}
interface AboutAsync {
CSPName(ProviderType?: number): Promise<string>;
CSPVersion(ProviderName?: string, ProviderType?: number): Promise<VersionAsync>;
ProviderVersion(ProviderName?: string, ProviderType?: number): Promise<string>;
readonly BuildVersion: Promise<number>;
readonly MajorVersion: Promise<number>;
readonly MinorVersion: Promise<number>;
readonly PluginVersion: Promise<VersionAsync>;
readonly Version: Promise<string>;
}
interface SignersAsync {
readonly Count: Promise<number>;
Item(index: number): Promise<CPSigner>;
}
interface SignedXMLAsync {
Sign(signer?: CPSignerAsync, XPath?: string): Promise<string>;
Verify(SignedMessage: string, XPath?: string): Promise<void>;
readonly Content: Promise<string>;
propset_Content(content: string): Promise<void>;
readonly DigestMethod: Promise<string>;
propset_DigestMethod(digestMethod: string): Promise<void>;
readonly SignatureMethod: Promise<string>;
propset_SignatureMethod(signatureMethod: string): Promise<void>;
readonly SignatureType: Promise<CADESCOM_XML_SIGNATURE_TYPE>;
propset_SignatureType(signatureType: CADESCOM_XML_SIGNATURE_TYPE): Promise<void>;
readonly Signers: Promise<SignersAsync>;
}
interface CPHashedDataAsync {
Hash(newVal: string): Promise<void>;
SetHashValue(newVal: string): Promise<void>;
readonly Algorithm: Promise<CAPICOM.CAPICOM_HASH_ALGORITHM>;
propset_Algorithm(algorithm: CAPICOM.CAPICOM_HASH_ALGORITHM): Promise<void>;
readonly DataEncoding: Promise<CADESCOM_CONTENT_ENCODING_TYPE>;
propset_DataEncoding(dataEncoding: CADESCOM_CONTENT_ENCODING_TYPE): Promise<void>;
readonly Value: Promise<string>;
}
interface CPAttributeAsync {
readonly Name: Promise<CADESCOM_ATTRIBUTE>;
propset_Name(name: CADESCOM_ATTRIBUTE): Promise<void>;
//OID: CAPICOM.IOID>;
readonly Value: Promise<any>;
propset_Value(value: any): Promise<void>;
readonly ValueEncoding: Promise<CAPICOM.CAPICOM_ENCODING_TYPE>;
propset_ValueEncoding(valueEncoding: CAPICOM.CAPICOM_ENCODING_TYPE): Promise<void>;
}
interface RawSignatureAsync {
SignHash(hash: CPHashedDataAsync, certificate?: string): Promise<string>;
VerifyHash(hash: CPHashedDataAsync, certificate: CAPICOM.ICertificateAsync, signature: string): Promise<void>;
}
}