-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCsp.pas
210 lines (138 loc) · 8.7 KB
/
Csp.pas
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
unit Csp;
interface
type
HCkStringTable = Pointer;
HCkString = Pointer;
HCkStringArray = Pointer;
HCkCsp = Pointer;
function CkCsp_Create: HCkCsp; stdcall;
procedure CkCsp_Dispose(handle: HCkCsp); stdcall;
procedure CkCsp_getDebugLogFilePath(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
procedure CkCsp_putDebugLogFilePath(objHandle: HCkCsp; newPropVal: PWideChar); stdcall;
function CkCsp__debugLogFilePath(objHandle: HCkCsp): PWideChar; stdcall;
procedure CkCsp_getEncryptAlgorithm(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__encryptAlgorithm(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_getEncryptAlgorithmID(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getEncryptNumBits(objHandle: HCkCsp): Integer; stdcall;
procedure CkCsp_getHashAlgorithm(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__hashAlgorithm(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_getHashAlgorithmID(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getHashNumBits(objHandle: HCkCsp): Integer; stdcall;
procedure CkCsp_getKeyContainerName(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
procedure CkCsp_putKeyContainerName(objHandle: HCkCsp; newPropVal: PWideChar); stdcall;
function CkCsp__keyContainerName(objHandle: HCkCsp): PWideChar; stdcall;
procedure CkCsp_getLastErrorHtml(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__lastErrorHtml(objHandle: HCkCsp): PWideChar; stdcall;
procedure CkCsp_getLastErrorText(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__lastErrorText(objHandle: HCkCsp): PWideChar; stdcall;
procedure CkCsp_getLastErrorXml(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__lastErrorXml(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_getLastMethodSuccess(objHandle: HCkCsp): wordbool; stdcall;
procedure CkCsp_putLastMethodSuccess(objHandle: HCkCsp; newPropVal: wordbool); stdcall;
function CkCsp_getMachineKeyset(objHandle: HCkCsp): wordbool; stdcall;
procedure CkCsp_putMachineKeyset(objHandle: HCkCsp; newPropVal: wordbool); stdcall;
function CkCsp_getNumEncryptAlgorithms(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getNumHashAlgorithms(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getNumKeyContainers(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getNumKeyExchangeAlgorithms(objHandle: HCkCsp): Integer; stdcall;
function CkCsp_getNumSignatureAlgorithms(objHandle: HCkCsp): Integer; stdcall;
procedure CkCsp_getProviderName(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
procedure CkCsp_putProviderName(objHandle: HCkCsp; newPropVal: PWideChar); stdcall;
function CkCsp__providerName(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_getProviderType(objHandle: HCkCsp): Integer; stdcall;
procedure CkCsp_getUncommonOptions(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
procedure CkCsp_putUncommonOptions(objHandle: HCkCsp; newPropVal: PWideChar); stdcall;
function CkCsp__uncommonOptions(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_getVerboseLogging(objHandle: HCkCsp): wordbool; stdcall;
procedure CkCsp_putVerboseLogging(objHandle: HCkCsp; newPropVal: wordbool); stdcall;
procedure CkCsp_getVersion(objHandle: HCkCsp; outPropVal: HCkString); stdcall;
function CkCsp__version(objHandle: HCkCsp): PWideChar; stdcall;
function CkCsp_GetKeyContainerNames(objHandle: HCkCsp): HCkStringArray; stdcall;
function CkCsp_GetProviders(objHandle: HCkCsp; providerNames: HCkStringTable): wordbool; stdcall;
function CkCsp_HasEncryptAlgorithm(objHandle: HCkCsp; name: PWideChar; numBits: Integer): wordbool; stdcall;
function CkCsp_HasHashAlgorithm(objHandle: HCkCsp; name: PWideChar; numBits: Integer): wordbool; stdcall;
function CkCsp_Initialize(objHandle: HCkCsp): wordbool; stdcall;
function CkCsp_NthEncryptionAlgorithm(objHandle: HCkCsp; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkCsp__nthEncryptionAlgorithm(objHandle: HCkCsp; index: Integer): PWideChar; stdcall;
function CkCsp_NthEncryptionNumBits(objHandle: HCkCsp; index: Integer): Integer; stdcall;
function CkCsp_NthHashAlgorithmName(objHandle: HCkCsp; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkCsp__nthHashAlgorithmName(objHandle: HCkCsp; index: Integer): PWideChar; stdcall;
function CkCsp_NthHashNumBits(objHandle: HCkCsp; index: Integer): Integer; stdcall;
function CkCsp_NthKeyContainerName(objHandle: HCkCsp; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkCsp__nthKeyContainerName(objHandle: HCkCsp; index: Integer): PWideChar; stdcall;
function CkCsp_NthKeyExchangeAlgorithm(objHandle: HCkCsp; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkCsp__nthKeyExchangeAlgorithm(objHandle: HCkCsp; index: Integer): PWideChar; stdcall;
function CkCsp_NthKeyExchangeNumBits(objHandle: HCkCsp; index: Integer): Integer; stdcall;
function CkCsp_NthSignatureAlgorithm(objHandle: HCkCsp; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkCsp__nthSignatureAlgorithm(objHandle: HCkCsp; index: Integer): PWideChar; stdcall;
function CkCsp_NthSignatureNumBits(objHandle: HCkCsp; index: Integer): Integer; stdcall;
function CkCsp_SaveLastError(objHandle: HCkCsp; path: PWideChar): wordbool; stdcall;
function CkCsp_SetEncryptAlgorithm(objHandle: HCkCsp; name: PWideChar): Integer; stdcall;
function CkCsp_SetHashAlgorithm(objHandle: HCkCsp; name: PWideChar): Integer; stdcall;
implementation
{$Include chilkatDllPath.inc}
function CkCsp_Create; external DLLName;
procedure CkCsp_Dispose; external DLLName;
procedure CkCsp_getDebugLogFilePath; external DLLName;
procedure CkCsp_putDebugLogFilePath; external DLLName;
function CkCsp__debugLogFilePath; external DLLName;
procedure CkCsp_getEncryptAlgorithm; external DLLName;
function CkCsp__encryptAlgorithm; external DLLName;
function CkCsp_getEncryptAlgorithmID; external DLLName;
function CkCsp_getEncryptNumBits; external DLLName;
procedure CkCsp_getHashAlgorithm; external DLLName;
function CkCsp__hashAlgorithm; external DLLName;
function CkCsp_getHashAlgorithmID; external DLLName;
function CkCsp_getHashNumBits; external DLLName;
procedure CkCsp_getKeyContainerName; external DLLName;
procedure CkCsp_putKeyContainerName; external DLLName;
function CkCsp__keyContainerName; external DLLName;
procedure CkCsp_getLastErrorHtml; external DLLName;
function CkCsp__lastErrorHtml; external DLLName;
procedure CkCsp_getLastErrorText; external DLLName;
function CkCsp__lastErrorText; external DLLName;
procedure CkCsp_getLastErrorXml; external DLLName;
function CkCsp__lastErrorXml; external DLLName;
function CkCsp_getLastMethodSuccess; external DLLName;
procedure CkCsp_putLastMethodSuccess; external DLLName;
function CkCsp_getMachineKeyset; external DLLName;
procedure CkCsp_putMachineKeyset; external DLLName;
function CkCsp_getNumEncryptAlgorithms; external DLLName;
function CkCsp_getNumHashAlgorithms; external DLLName;
function CkCsp_getNumKeyContainers; external DLLName;
function CkCsp_getNumKeyExchangeAlgorithms; external DLLName;
function CkCsp_getNumSignatureAlgorithms; external DLLName;
procedure CkCsp_getProviderName; external DLLName;
procedure CkCsp_putProviderName; external DLLName;
function CkCsp__providerName; external DLLName;
function CkCsp_getProviderType; external DLLName;
procedure CkCsp_getUncommonOptions; external DLLName;
procedure CkCsp_putUncommonOptions; external DLLName;
function CkCsp__uncommonOptions; external DLLName;
function CkCsp_getVerboseLogging; external DLLName;
procedure CkCsp_putVerboseLogging; external DLLName;
procedure CkCsp_getVersion; external DLLName;
function CkCsp__version; external DLLName;
function CkCsp_GetKeyContainerNames; external DLLName;
function CkCsp_GetProviders; external DLLName;
function CkCsp_HasEncryptAlgorithm; external DLLName;
function CkCsp_HasHashAlgorithm; external DLLName;
function CkCsp_Initialize; external DLLName;
function CkCsp_NthEncryptionAlgorithm; external DLLName;
function CkCsp__nthEncryptionAlgorithm; external DLLName;
function CkCsp_NthEncryptionNumBits; external DLLName;
function CkCsp_NthHashAlgorithmName; external DLLName;
function CkCsp__nthHashAlgorithmName; external DLLName;
function CkCsp_NthHashNumBits; external DLLName;
function CkCsp_NthKeyContainerName; external DLLName;
function CkCsp__nthKeyContainerName; external DLLName;
function CkCsp_NthKeyExchangeAlgorithm; external DLLName;
function CkCsp__nthKeyExchangeAlgorithm; external DLLName;
function CkCsp_NthKeyExchangeNumBits; external DLLName;
function CkCsp_NthSignatureAlgorithm; external DLLName;
function CkCsp__nthSignatureAlgorithm; external DLLName;
function CkCsp_NthSignatureNumBits; external DLLName;
function CkCsp_SaveLastError; external DLLName;
function CkCsp_SetEncryptAlgorithm; external DLLName;
function CkCsp_SetHashAlgorithm; external DLLName;
end.