Developer's Guide
Guide
Modules
Index
Files
v2017.1.19000
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
p6crypto.h
Go to the documentation of this file.
1
11
#ifndef P6CRYPTO_H__
12
#define P6CRYPTO_H__ 1
13
14
#include "
p6entropy.h
"
15
16
#ifdef __cplusplus
17
namespace
P6R {
18
extern
"C"
{
19
#endif
20
36
typedef
struct
37
{
38
const
P6WCHAR
*
pFilePath
;
39
P6BOOL
skipLineTermination
;
40
const
P6CHAR
*
pBuffer
;
41
P6UINT32
byteCount
;
42
}
P6CRYPTODATASOURCE
;
43
44
54
typedef
struct
55
{
56
const
P6WCHAR
*
pFilePath
;
57
P6UCHAR
*
pBuffer
;
58
P6UINT32
byteCount
;
59
P6UINT32
reserved
;
60
}
P6CRYPTODATASINK
;
61
62
112
typedef
enum
{
113
CIPHER_AES_CBC
= 0x00,
114
CIPHER_AES_CFB
= 0x01,
115
CIPHER_AES_CTR
= 0x02,
116
CIPHER_AES_ECB
= 0x03,
117
CIPHER_AES_OFB
= 0x04,
118
119
CIPHER_BF_CBC
= 0x05,
120
CIPHER_BF_CFB
= 0x06,
121
CIPHER_BF_ECB
= 0x07,
122
CIPHER_BF_OFB
= 0x08,
123
124
CIPHER_CAST_CBC
= 0x09,
125
CIPHER_CAST_CFB
= 0x0A,
126
CIPHER_CAST_ECB
= 0x0B,
127
CIPHER_CAST_OFB
= 0x0C,
128
129
CIPHER_DES_CBC
= 0x0D,
130
CIPHER_DES_CFB
= 0x0E,
131
CIPHER_DES_ECB
= 0x0F,
132
CIPHER_DES_OFB
= 0x10,
133
134
CIPHER_DES3_CBC
= 0x11,
135
CIPHER_DES3_CFB
= 0x12,
136
CIPHER_DES3_ECB
= 0x13,
137
CIPHER_DES3_OFB
= 0x14,
138
139
CIPHER_DESX_CBC
= 0x15,
140
141
CIPHER_RC2_CBC
= 0x16,
142
CIPHER_RC2_CFB
= 0x17,
143
CIPHER_RC2_ECB
= 0x18,
144
CIPHER_RC2_OFB
= 0x19,
145
146
CIPHER_RC4
= 0x1A,
147
148
CIPHER_RC5_CBC
= 0x1B,
149
CIPHER_RC5_CFB
= 0x1C,
150
CIPHER_RC5_ECB
= 0x1D,
151
CIPHER_RC5_OFB
= 0x1E,
152
153
CIPHER_EC
= 0x1F,
154
CIPHER_ECDSA
= 0x20,
155
CIPHER_ECDH
= 0x21,
156
CIPHER_ECMQV
= 0x22,
157
158
CIPHER_IDEA_CBC
= 0x23,
159
CIPHER_IDEA_CFB
= 0x24,
160
CIPHER_IDEA_ECB
= 0x25,
161
CIPHER_IDEA_OFB
= 0x26,
162
163
CIPHER_MAX
164
}
P6CRYPTOCIPHER
;
165
166
174
typedef
enum
{
175
CURVE_UNKNOWN
= 0x00,
176
CURVE_P_192
= 0x01,
177
CURVE_K_163
= 0x02,
178
CURVE_B_163
= 0x03,
179
CURVE_P_224
= 0x04,
180
CURVE_K_233
= 0x05,
181
CURVE_B_233
= 0x06,
182
CURVE_P_256
= 0x07,
183
CURVE_K_283
= 0x08,
184
CURVE_B_283
= 0x09,
185
CURVE_P_384
= 0x0A,
186
CURVE_K_409
= 0x0B,
187
CURVE_B_409
= 0x0C,
188
CURVE_P_521
= 0x0D,
189
CURVE_K_571
= 0x0E,
190
CURVE_B_571
= 0x0F,
191
CURVE_SECP112R1
= 0x10,
192
CURVE_SECP112R2
= 0x11,
193
CURVE_SECP128R1
= 0x12,
194
CURVE_SECP128R2
= 0x13,
195
CURVE_SECP160K1
= 0x14,
196
CURVE_SECP160R1
= 0x15,
197
CURVE_SECP160R2
= 0x16,
198
CURVE_SECP192K1
= 0x17,
199
CURVE_SECP224K1
= 0x18,
200
CURVE_SECP256K1
= 0x19,
201
CURVE_SECT113R1
= 0x1A,
202
CURVE_SECT113R2
= 0x1B,
203
CURVE_SECT131R1
= 0x1C,
204
CURVE_SECT131R2
= 0x1D,
205
CURVE_SECT163R1
= 0x1E,
206
CURVE_SECT193R1
= 0x1F,
207
CURVE_SECT193R2
= 0x20,
208
CURVE_SECT239K1
= 0x21,
209
CURVE_ANSIX9P192V2
= 0x22,
210
CURVE_ANSIX9P192V3
= 0x23,
211
CURVE_ANSIX9P239V1
= 0x24,
212
CURVE_ANSIX9P239V2
= 0x25,
213
CURVE_ANSIX9P239V3
= 0x26,
214
CURVE_ANSIX9C2PNB163V1
= 0x27,
215
CURVE_ANSIX9C2PNB163V2
= 0x28,
216
CURVE_ANSIX9C2PNB163V3
= 0x29,
217
CURVE_ANSIX9C2PNB176V1
= 0x2A,
218
CURVE_ANSIX9C2TNB191V1
= 0x2B,
219
CURVE_ANSIX9C2TNB191V2
= 0x2C,
220
CURVE_ANSIX9C2TNB191V3
= 0x2D,
221
CURVE_ANSIX9C2PNB208W1
= 0x2E,
222
CURVE_ANSIX9C2TNB239V1
= 0x2F,
223
CURVE_ANSIX9C2TNB239V2
= 0x30,
224
CURVE_ANSIX9C2TNB239V3
= 0x31,
225
CURVE_ANSIX9C2PNB272W1
= 0x32,
226
CURVE_ANSIX9C2PNB304W1
= 0x33,
227
CURVE_ANSIX9C2TNB359V1
= 0x34,
228
CURVE_ANSIX9C2PNB368W1
= 0x35,
229
CURVE_ANSIX9C2TNB431R1
= 0x36,
230
CURVE_BRAINPOOL_P160R1
= 0x37,
231
CURVE_BRAINPOOL_P160T1
= 0x38,
232
CURVE_BRAINPOOL_P192R1
= 0x39,
233
CURVE_BRAINPOOL_P192T1
= 0x3A,
234
CURVE_BRAINPOOL_P224R1
= 0x3B,
235
CURVE_BRAINPOOL_P224T1
= 0x3C,
236
CURVE_BRAINPOOL_P256R1
= 0x3D,
237
CURVE_BRAINPOOL_P256T1
= 0x3E,
238
CURVE_BRAINPOOL_P320R1
= 0x3F,
239
CURVE_BRAINPOOL_P320T1
= 0x40,
240
CURVE_BRAINPOOL_P384R1
= 0x41,
241
CURVE_BRAINPOOL_P384T1
= 0x42,
242
CURVE_BRAINPOOL_P512R1
= 0x43,
243
CURVE_BRAINPOOL_P512T1
= 0x44
244
}
P6ECCURVE
;
245
246
250
typedef
enum
{
251
P6CRYPTCERTFMT_DER
,
252
P6CRYPTCERTFMT_NETSCAPE
,
253
P6CRYPTCERTFMT_PEM
,
254
P6CRYPTCERTFMT_PKCS12
,
255
P6CRYPTCERTFMT_MAX
256
}
P6CRYPTCERTFMT
;
257
258
262
typedef
enum
{
263
P6CRYPTKEYFMT_DER
,
264
P6CRYPTKEYFMT_PEM
,
265
P6CRYPTKEYFMT_PKCS12
,
266
P6CRYPTKEYFMT_MAX
267
}
P6CRYPTKEYFMT
;
268
269
#ifdef __cplusplus
270
}
// extern "C"
271
}
// namespace
272
#endif
273
274
#endif
275
276
277
278
279
280
P6R::CURVE_BRAINPOOL_P160T1
Definition:
p6crypto.h:231
P6R::CURVE_SECT113R1
Definition:
p6crypto.h:201
P6R::P6CRYPTCERTFMT_PEM
Definition:
p6crypto.h:253
P6R::CIPHER_RC5_CBC
Definition:
p6crypto.h:148
P6R::P6CRYPTCERTFMT_MAX
Definition:
p6crypto.h:255
P6R::CIPHER_DES_ECB
Definition:
p6crypto.h:131
P6R::CURVE_K_571
Definition:
p6crypto.h:189
P6R::CURVE_ANSIX9P239V2
Definition:
p6crypto.h:212
P6R::CURVE_BRAINPOOL_P320R1
Definition:
p6crypto.h:238
P6R::P6UCHAR
unsigned char P6UCHAR
Definition:
p6types.h:108
P6R::CIPHER_ECMQV
Definition:
p6crypto.h:156
P6R::CURVE_SECP160R1
Definition:
p6crypto.h:196
P6R::CIPHER_EC
Definition:
p6crypto.h:153
P6R::CIPHER_CAST_CBC
Definition:
p6crypto.h:124
P6R::CIPHER_DES_OFB
Definition:
p6crypto.h:132
P6R::CIPHER_AES_OFB
Definition:
p6crypto.h:117
P6R::CIPHER_RC4
Definition:
p6crypto.h:146
P6R::CURVE_ANSIX9C2TNB359V1
Definition:
p6crypto.h:227
P6R::CURVE_SECT131R1
Definition:
p6crypto.h:203
P6R::P6UINT32
uint32_t P6UINT32
Definition:
p6types.h:77
P6R::CURVE_P_384
Definition:
p6crypto.h:185
P6R::CURVE_P_521
Definition:
p6crypto.h:188
P6R::P6CRYPTKEYFMT_MAX
Definition:
p6crypto.h:266
P6R::P6CRYPTCERTFMT_NETSCAPE
Definition:
p6crypto.h:252
P6R::CURVE_UNKNOWN
Definition:
p6crypto.h:175
P6R::CURVE_BRAINPOOL_P224R1
Definition:
p6crypto.h:234
P6R::CURVE_SECP160R2
Definition:
p6crypto.h:197
P6R::CURVE_SECT193R2
Definition:
p6crypto.h:207
P6R::CIPHER_RC2_CBC
Definition:
p6crypto.h:141
P6R::P6CRYPTODATASOURCE::skipLineTermination
P6BOOL skipLineTermination
Definition:
p6crypto.h:39
P6R::CIPHER_BF_OFB
Definition:
p6crypto.h:122
P6R::CURVE_BRAINPOOL_P224T1
Definition:
p6crypto.h:235
P6R::P6BOOL
unsigned char P6BOOL
Boolean type.
Definition:
p6types.h:133
P6R::CURVE_ANSIX9P239V3
Definition:
p6crypto.h:213
P6R::CIPHER_IDEA_CBC
Definition:
p6crypto.h:158
P6R::P6CRYPTCERTFMT_PKCS12
Definition:
p6crypto.h:254
P6R::P6CRYPTKEYFMT_DER
Definition:
p6crypto.h:263
P6R::CURVE_B_163
Definition:
p6crypto.h:178
P6R::CIPHER_RC5_OFB
Definition:
p6crypto.h:151
P6R::CURVE_BRAINPOOL_P384T1
Definition:
p6crypto.h:241
P6R::P6CRYPTODATASOURCE::byteCount
P6UINT32 byteCount
Definition:
p6crypto.h:41
P6R::CURVE_SECP192K1
Definition:
p6crypto.h:198
P6R::CURVE_SECT239K1
Definition:
p6crypto.h:208
P6R::CIPHER_DES_CFB
Definition:
p6crypto.h:130
P6R::CIPHER_IDEA_CFB
Definition:
p6crypto.h:159
P6R::CIPHER_RC5_ECB
Definition:
p6crypto.h:150
P6R::CURVE_ANSIX9C2TNB191V1
Definition:
p6crypto.h:218
P6R::CIPHER_ECDH
Definition:
p6crypto.h:155
P6R::CURVE_SECP128R1
Definition:
p6crypto.h:193
P6R::CURVE_ANSIX9C2PNB272W1
Definition:
p6crypto.h:225
P6R::CURVE_BRAINPOOL_P512R1
Definition:
p6crypto.h:242
P6R::CURVE_SECP112R1
Definition:
p6crypto.h:191
P6R::CURVE_BRAINPOOL_P512T1
Definition:
p6crypto.h:243
P6R::CURVE_ANSIX9C2TNB191V2
Definition:
p6crypto.h:219
P6R::CURVE_ANSIX9C2TNB239V1
Definition:
p6crypto.h:222
P6R::CIPHER_MAX
Definition:
p6crypto.h:163
P6R::P6CRYPTODATASINK::pFilePath
const P6WCHAR * pFilePath
Definition:
p6crypto.h:56
P6R::CURVE_BRAINPOOL_P192T1
Definition:
p6crypto.h:233
P6R::CIPHER_AES_CFB
Definition:
p6crypto.h:114
P6R::CIPHER_BF_CBC
Definition:
p6crypto.h:119
P6R::CIPHER_AES_CBC
Definition:
p6crypto.h:113
P6R::CIPHER_BF_ECB
Definition:
p6crypto.h:121
P6R::P6CRYPTOCIPHER
P6CRYPTOCIPHER
Cipher Type.
Definition:
p6crypto.h:112
P6R::CIPHER_IDEA_OFB
Definition:
p6crypto.h:161
P6R::CURVE_ANSIX9C2PNB163V3
Definition:
p6crypto.h:216
P6R::CIPHER_DES3_OFB
Definition:
p6crypto.h:137
P6R::CURVE_BRAINPOOL_P160R1
Definition:
p6crypto.h:230
P6R::CURVE_SECP160K1
Definition:
p6crypto.h:195
P6R::CURVE_SECP112R2
Definition:
p6crypto.h:192
P6R::P6WCHAR
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition:
p6types.h:111
P6R::CURVE_BRAINPOOL_P256R1
Definition:
p6crypto.h:236
P6R::CURVE_ANSIX9C2TNB431R1
Definition:
p6crypto.h:229
P6R::CIPHER_RC2_CFB
Definition:
p6crypto.h:142
P6R::CIPHER_BF_CFB
Definition:
p6crypto.h:120
P6R::CIPHER_IDEA_ECB
Definition:
p6crypto.h:160
P6R::P6CRYPTCERTFMT
P6CRYPTCERTFMT
Defines the supported encodings for certificate data.
Definition:
p6crypto.h:250
P6R::P6CRYPTKEYFMT
P6CRYPTKEYFMT
Defines the supported encodings for crypto key data.
Definition:
p6crypto.h:262
P6R::CURVE_ANSIX9C2PNB163V2
Definition:
p6crypto.h:215
P6R::CURVE_P_192
Definition:
p6crypto.h:176
P6R::CURVE_K_283
Definition:
p6crypto.h:183
P6R::P6CRYPTODATASOURCE
Where to get the data to process, either a file or generic buffer.
Definition:
p6crypto.h:36
P6R::CURVE_SECT163R1
Definition:
p6crypto.h:205
P6R::CURVE_ANSIX9P192V3
Definition:
p6crypto.h:210
P6R::CURVE_B_233
Definition:
p6crypto.h:181
P6R::CURVE_ANSIX9C2PNB176V1
Definition:
p6crypto.h:217
P6R::CIPHER_AES_ECB
Definition:
p6crypto.h:116
P6R::P6CRYPTODATASINK::reserved
P6UINT32 reserved
Definition:
p6crypto.h:59
P6R::CIPHER_CAST_CFB
Definition:
p6crypto.h:125
P6R::CIPHER_CAST_ECB
Definition:
p6crypto.h:126
P6R::P6CRYPTODATASINK::pBuffer
P6UCHAR * pBuffer
Definition:
p6crypto.h:57
P6R::CURVE_BRAINPOOL_P384R1
Definition:
p6crypto.h:240
P6R::CURVE_ANSIX9C2PNB208W1
Definition:
p6crypto.h:221
P6R::CIPHER_RC2_OFB
Definition:
p6crypto.h:144
P6R::CIPHER_RC2_ECB
Definition:
p6crypto.h:143
P6R::CIPHER_DES_CBC
Definition:
p6crypto.h:129
P6R::P6ECCURVE
P6ECCURVE
EC Curve Type.
Definition:
p6crypto.h:174
P6R::P6CRYPTKEYFMT_PKCS12
Definition:
p6crypto.h:265
P6R::CURVE_B_283
Definition:
p6crypto.h:184
P6R::CURVE_P_256
Definition:
p6crypto.h:182
P6R::P6CRYPTODATASINK::byteCount
P6UINT32 byteCount
Definition:
p6crypto.h:58
P6R::CIPHER_ECDSA
Definition:
p6crypto.h:154
P6R::CIPHER_RC5_CFB
Definition:
p6crypto.h:149
P6R::CURVE_K_233
Definition:
p6crypto.h:180
P6R::CURVE_SECP256K1
Definition:
p6crypto.h:200
P6R::P6CRYPTKEYFMT_PEM
Definition:
p6crypto.h:264
P6R::P6CRYPTODATASINK
Where to put the data processed, either a file or generic buffer.
Definition:
p6crypto.h:54
P6R::CURVE_ANSIX9P192V2
Definition:
p6crypto.h:209
P6R::P6CRYPTODATASOURCE::pBuffer
const P6CHAR * pBuffer
Definition:
p6crypto.h:40
P6R::CURVE_K_409
Definition:
p6crypto.h:186
P6R::CURVE_ANSIX9P239V1
Definition:
p6crypto.h:211
P6R::CIPHER_DES3_ECB
Definition:
p6crypto.h:136
P6R::CURVE_ANSIX9C2TNB191V3
Definition:
p6crypto.h:220
P6R::CURVE_P_224
Definition:
p6crypto.h:179
P6R::P6CRYPTCERTFMT_DER
Definition:
p6crypto.h:251
P6R::P6CRYPTODATASOURCE::pFilePath
const P6WCHAR * pFilePath
Definition:
p6crypto.h:38
P6R::CURVE_ANSIX9C2PNB163V1
Definition:
p6crypto.h:214
P6R::CURVE_SECT113R2
Definition:
p6crypto.h:202
P6R::CURVE_B_409
Definition:
p6crypto.h:187
P6R::CURVE_BRAINPOOL_P320T1
Definition:
p6crypto.h:239
P6R::CIPHER_DES3_CBC
Definition:
p6crypto.h:134
P6R::CURVE_SECT131R2
Definition:
p6crypto.h:204
P6R::CURVE_ANSIX9C2PNB368W1
Definition:
p6crypto.h:228
P6R::CURVE_K_163
Definition:
p6crypto.h:177
P6R::CURVE_ANSIX9C2TNB239V2
Definition:
p6crypto.h:223
P6R::CURVE_BRAINPOOL_P256T1
Definition:
p6crypto.h:237
P6R::CURVE_B_571
Definition:
p6crypto.h:190
P6R::CURVE_SECP224K1
Definition:
p6crypto.h:199
P6R::CURVE_BRAINPOOL_P192R1
Definition:
p6crypto.h:232
P6R::CIPHER_DES3_CFB
Definition:
p6crypto.h:135
P6R::CURVE_SECT193R1
Definition:
p6crypto.h:206
P6R::CIPHER_DESX_CBC
Definition:
p6crypto.h:139
P6R::CURVE_ANSIX9C2TNB239V3
Definition:
p6crypto.h:224
P6R::CIPHER_CAST_OFB
Definition:
p6crypto.h:127
P6R::CIPHER_AES_CTR
Definition:
p6crypto.h:115
P6R::CURVE_SECP128R2
Definition:
p6crypto.h:194
p6entropy.h
Interface definition for 3rd parties to provide separate entropy implementations. ...
P6R::P6CHAR
char P6CHAR
Narrow character type.
Definition:
p6types.h:105
P6R::CURVE_ANSIX9C2PNB304W1
Definition:
p6crypto.h:226
current
WINNT6.1_x86_OPT_64bit_vs2010.OBJ
intermediate
skc
src
p6crypto.h
© 2004 - 2014 P6R Inc. - All Rights Reserved.