]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - crypto/heimdal/doc/doxyout/hcrypto/man/man3/hcrypto_evp.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / crypto / heimdal / doc / doxyout / hcrypto / man / man3 / hcrypto_evp.3
1 .TH "EVP generic crypto functions" 3 "11 Jan 2012" "Version 1.5.2" "Heimdal crypto library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 EVP generic crypto functions \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "const EVP_CIPHER * \fBEVP_wincrypt_des_ede3_cbc\fP (void)"
11 .br
12 .ti -1c
13 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_128_cbc\fP (void)"
14 .br
15 .ti -1c
16 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_192_cbc\fP (void)"
17 .br
18 .ti -1c
19 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_256_cbc\fP (void)"
20 .br
21 .ti -1c
22 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_128_cfb8\fP (void)"
23 .br
24 .ti -1c
25 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_192_cfb8\fP (void)"
26 .br
27 .ti -1c
28 .RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_256_cfb8\fP (void)"
29 .br
30 .ti -1c
31 .RI "const EVP_MD * \fBEVP_hcrypto_sha256\fP (void)"
32 .br
33 .ti -1c
34 .RI "const EVP_MD * \fBEVP_hcrypto_sha384\fP (void)"
35 .br
36 .ti -1c
37 .RI "const EVP_MD * \fBEVP_hcrypto_sha512\fP (void)"
38 .br
39 .ti -1c
40 .RI "const EVP_MD * \fBEVP_hcrypto_sha1\fP (void)"
41 .br
42 .ti -1c
43 .RI "const EVP_MD * \fBEVP_hcrypto_md5\fP (void)"
44 .br
45 .ti -1c
46 .RI "const EVP_MD * \fBEVP_hcrypto_md4\fP (void)"
47 .br
48 .ti -1c
49 .RI "const EVP_MD * \fBEVP_hcrypto_md2\fP (void)"
50 .br
51 .ti -1c
52 .RI "const EVP_CIPHER * \fBEVP_hcrypto_des_cbc\fP (void)"
53 .br
54 .ti -1c
55 .RI "const EVP_CIPHER * \fBEVP_hcrypto_des_ede3_cbc\fP (void)"
56 .br
57 .ti -1c
58 .RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_cbc\fP (void)"
59 .br
60 .ti -1c
61 .RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_40_cbc\fP (void)"
62 .br
63 .ti -1c
64 .RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_64_cbc\fP (void)"
65 .br
66 .ti -1c
67 .RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_128_cbc\fP (void)"
68 .br
69 .ti -1c
70 .RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_192_cbc\fP (void)"
71 .br
72 .ti -1c
73 .RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_256_cbc\fP (void)"
74 .br
75 .ti -1c
76 .RI "size_t \fBEVP_MD_size\fP (const EVP_MD *md)"
77 .br
78 .ti -1c
79 .RI "size_t \fBEVP_MD_block_size\fP (const EVP_MD *md)"
80 .br
81 .ti -1c
82 .RI "EVP_MD_CTX * \fBEVP_MD_CTX_create\fP (void)"
83 .br
84 .ti -1c
85 .RI "void \fBEVP_MD_CTX_init\fP (EVP_MD_CTX *ctx) HC_DEPRECATED"
86 .br
87 .ti -1c
88 .RI "void \fBEVP_MD_CTX_destroy\fP (EVP_MD_CTX *ctx)"
89 .br
90 .ti -1c
91 .RI "int \fBEVP_MD_CTX_cleanup\fP (EVP_MD_CTX *ctx) HC_DEPRECATED"
92 .br
93 .ti -1c
94 .RI "const EVP_MD * \fBEVP_MD_CTX_md\fP (EVP_MD_CTX *ctx)"
95 .br
96 .ti -1c
97 .RI "size_t \fBEVP_MD_CTX_size\fP (EVP_MD_CTX *ctx)"
98 .br
99 .ti -1c
100 .RI "size_t \fBEVP_MD_CTX_block_size\fP (EVP_MD_CTX *ctx)"
101 .br
102 .ti -1c
103 .RI "int \fBEVP_DigestInit_ex\fP (EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine)"
104 .br
105 .ti -1c
106 .RI "int \fBEVP_DigestUpdate\fP (EVP_MD_CTX *ctx, const void *data, size_t size)"
107 .br
108 .ti -1c
109 .RI "int \fBEVP_DigestFinal_ex\fP (EVP_MD_CTX *ctx, void *hash, unsigned int *size)"
110 .br
111 .ti -1c
112 .RI "int \fBEVP_Digest\fP (const void *data, size_t dsize, void *hash, unsigned int *hsize, const EVP_MD *md, ENGINE *engine)"
113 .br
114 .ti -1c
115 .RI "const EVP_MD * \fBEVP_sha256\fP (void)"
116 .br
117 .ti -1c
118 .RI "const EVP_MD * \fBEVP_sha384\fP (void)"
119 .br
120 .ti -1c
121 .RI "const EVP_MD * \fBEVP_sha512\fP (void)"
122 .br
123 .ti -1c
124 .RI "const EVP_MD * \fBEVP_sha1\fP (void)"
125 .br
126 .ti -1c
127 .RI "const EVP_MD * \fBEVP_sha\fP (void)"
128 .br
129 .ti -1c
130 .RI "const EVP_MD * \fBEVP_md5\fP (void)"
131 .br
132 .ti -1c
133 .RI "const EVP_MD * \fBEVP_md4\fP (void)"
134 .br
135 .ti -1c
136 .RI "const EVP_MD * \fBEVP_md2\fP (void)"
137 .br
138 .ti -1c
139 .RI "const EVP_MD * \fBEVP_md_null\fP (void)"
140 .br
141 .ti -1c
142 .RI "size_t \fBEVP_CIPHER_block_size\fP (const EVP_CIPHER *c)"
143 .br
144 .ti -1c
145 .RI "size_t \fBEVP_CIPHER_key_length\fP (const EVP_CIPHER *c)"
146 .br
147 .ti -1c
148 .RI "size_t \fBEVP_CIPHER_iv_length\fP (const EVP_CIPHER *c)"
149 .br
150 .ti -1c
151 .RI "void \fBEVP_CIPHER_CTX_init\fP (EVP_CIPHER_CTX *c)"
152 .br
153 .ti -1c
154 .RI "int \fBEVP_CIPHER_CTX_cleanup\fP (EVP_CIPHER_CTX *c)"
155 .br
156 .ti -1c
157 .RI "int \fBEVP_CIPHER_CTX_set_key_length\fP (EVP_CIPHER_CTX *c, int length)"
158 .br
159 .ti -1c
160 .RI "const EVP_CIPHER * \fBEVP_CIPHER_CTX_cipher\fP (EVP_CIPHER_CTX *ctx)"
161 .br
162 .ti -1c
163 .RI "size_t \fBEVP_CIPHER_CTX_block_size\fP (const EVP_CIPHER_CTX *ctx)"
164 .br
165 .ti -1c
166 .RI "size_t \fBEVP_CIPHER_CTX_key_length\fP (const EVP_CIPHER_CTX *ctx)"
167 .br
168 .ti -1c
169 .RI "size_t \fBEVP_CIPHER_CTX_iv_length\fP (const EVP_CIPHER_CTX *ctx)"
170 .br
171 .ti -1c
172 .RI "unsigned long \fBEVP_CIPHER_CTX_flags\fP (const EVP_CIPHER_CTX *ctx)"
173 .br
174 .ti -1c
175 .RI "int \fBEVP_CIPHER_CTX_mode\fP (const EVP_CIPHER_CTX *ctx)"
176 .br
177 .ti -1c
178 .RI "void * \fBEVP_CIPHER_CTX_get_app_data\fP (EVP_CIPHER_CTX *ctx)"
179 .br
180 .ti -1c
181 .RI "void \fBEVP_CIPHER_CTX_set_app_data\fP (EVP_CIPHER_CTX *ctx, void *data)"
182 .br
183 .ti -1c
184 .RI "int \fBEVP_CipherInit_ex\fP (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE *engine, const void *key, const void *iv, int encp)"
185 .br
186 .ti -1c
187 .RI "int \fBEVP_CipherUpdate\fP (EVP_CIPHER_CTX *ctx, void *out, int *outlen, void *in, size_t inlen)"
188 .br
189 .ti -1c
190 .RI "int \fBEVP_CipherFinal_ex\fP (EVP_CIPHER_CTX *ctx, void *out, int *outlen)"
191 .br
192 .ti -1c
193 .RI "const EVP_CIPHER * \fBEVP_enc_null\fP (void)"
194 .br
195 .ti -1c
196 .RI "const EVP_CIPHER * \fBEVP_rc2_cbc\fP (void)"
197 .br
198 .ti -1c
199 .RI "const EVP_CIPHER * \fBEVP_rc2_40_cbc\fP (void)"
200 .br
201 .ti -1c
202 .RI "const EVP_CIPHER * \fBEVP_rc2_64_cbc\fP (void)"
203 .br
204 .ti -1c
205 .RI "const EVP_CIPHER * \fBEVP_rc4\fP (void)"
206 .br
207 .ti -1c
208 .RI "const EVP_CIPHER * \fBEVP_rc4_40\fP (void)"
209 .br
210 .ti -1c
211 .RI "const EVP_CIPHER * \fBEVP_des_cbc\fP (void)"
212 .br
213 .ti -1c
214 .RI "const EVP_CIPHER * \fBEVP_des_ede3_cbc\fP (void)"
215 .br
216 .ti -1c
217 .RI "const EVP_CIPHER * \fBEVP_aes_128_cbc\fP (void)"
218 .br
219 .ti -1c
220 .RI "const EVP_CIPHER * \fBEVP_aes_192_cbc\fP (void)"
221 .br
222 .ti -1c
223 .RI "const EVP_CIPHER * \fBEVP_aes_256_cbc\fP (void)"
224 .br
225 .ti -1c
226 .RI "const EVP_CIPHER * \fBEVP_aes_128_cfb8\fP (void)"
227 .br
228 .ti -1c
229 .RI "const EVP_CIPHER * \fBEVP_aes_192_cfb8\fP (void)"
230 .br
231 .ti -1c
232 .RI "const EVP_CIPHER * \fBEVP_aes_256_cfb8\fP (void)"
233 .br
234 .ti -1c
235 .RI "const EVP_CIPHER * \fBEVP_camellia_128_cbc\fP (void)"
236 .br
237 .ti -1c
238 .RI "const EVP_CIPHER * \fBEVP_camellia_192_cbc\fP (void)"
239 .br
240 .ti -1c
241 .RI "const EVP_CIPHER * \fBEVP_camellia_256_cbc\fP (void)"
242 .br
243 .ti -1c
244 .RI "const EVP_CIPHER * \fBEVP_get_cipherbyname\fP (const char *name)"
245 .br
246 .ti -1c
247 .RI "int \fBEVP_BytesToKey\fP (const EVP_CIPHER *type, const EVP_MD *md, const void *salt, const void *data, size_t datalen, unsigned int count, void *keydata, void *ivdata)"
248 .br
249 .in -1c
250 .SH "Detailed Description"
251 .PP 
252 See the \fBEVP - generic crypto interface\fP for description and examples. 
253 .SH "Function Documentation"
254 .PP 
255 .SS "const EVP_CIPHER* EVP_aes_128_cbc (void)"
256 .PP
257 The AES-128 cipher type
258 .PP
259 \fBReturns:\fP
260 .RS 4
261 the AES-128 EVP_CIPHER pointer. 
262 .RE
263 .PP
264
265 .PP
266 \fBExamples: \fP
267 .in +1c
268 \fBexample_evp_cipher.c\fP.
269 .SS "const EVP_CIPHER* EVP_aes_128_cfb8 (void)"
270 .PP
271 The AES-128 cipher type
272 .PP
273 \fBReturns:\fP
274 .RS 4
275 the AES-128 EVP_CIPHER pointer. 
276 .RE
277 .PP
278
279 .SS "const EVP_CIPHER* EVP_aes_192_cbc (void)"
280 .PP
281 The AES-192 cipher type
282 .PP
283 \fBReturns:\fP
284 .RS 4
285 the AES-192 EVP_CIPHER pointer. 
286 .RE
287 .PP
288
289 .SS "const EVP_CIPHER* EVP_aes_192_cfb8 (void)"
290 .PP
291 The AES-192 cipher type
292 .PP
293 \fBReturns:\fP
294 .RS 4
295 the AES-192 EVP_CIPHER pointer. 
296 .RE
297 .PP
298
299 .SS "const EVP_CIPHER* EVP_aes_256_cbc (void)"
300 .PP
301 The AES-256 cipher type
302 .PP
303 \fBReturns:\fP
304 .RS 4
305 the AES-256 EVP_CIPHER pointer. 
306 .RE
307 .PP
308
309 .SS "const EVP_CIPHER* EVP_aes_256_cfb8 (void)"
310 .PP
311 The AES-256 cipher type
312 .PP
313 \fBReturns:\fP
314 .RS 4
315 the AES-256 EVP_CIPHER pointer. 
316 .RE
317 .PP
318
319 .SS "int EVP_BytesToKey (const EVP_CIPHER * type, const EVP_MD * md, const void * salt, const void * data, size_t datalen, unsigned int count, void * keydata, void * ivdata)"
320 .PP
321 Provides a legancy string to key function, used in PEM files.
322 .PP
323 New protocols should use new string to key functions like NIST SP56-800A or PKCS#5 v2.0 (see \fBPKCS5_PBKDF2_HMAC_SHA1()\fP).
324 .PP
325 \fBParameters:\fP
326 .RS 4
327 \fItype\fP type of cipher to use 
328 .br
329 \fImd\fP message digest to use 
330 .br
331 \fIsalt\fP salt salt string, should be an binary 8 byte buffer. 
332 .br
333 \fIdata\fP the password/input key string. 
334 .br
335 \fIdatalen\fP length of data parameter. 
336 .br
337 \fIcount\fP iteration counter. 
338 .br
339 \fIkeydata\fP output keydata, needs to of the size \fBEVP_CIPHER_key_length()\fP. 
340 .br
341 \fIivdata\fP output ivdata, needs to of the size \fBEVP_CIPHER_block_size()\fP.
342 .RE
343 .PP
344 \fBReturns:\fP
345 .RS 4
346 the size of derived key. 
347 .RE
348 .PP
349
350 .SS "const EVP_CIPHER* EVP_camellia_128_cbc (void)"
351 .PP
352 The Camellia-128 cipher type
353 .PP
354 \fBReturns:\fP
355 .RS 4
356 the Camellia-128 EVP_CIPHER pointer. 
357 .RE
358 .PP
359
360 .SS "const EVP_CIPHER* EVP_camellia_192_cbc (void)"
361 .PP
362 The Camellia-198 cipher type
363 .PP
364 \fBReturns:\fP
365 .RS 4
366 the Camellia-198 EVP_CIPHER pointer. 
367 .RE
368 .PP
369
370 .SS "const EVP_CIPHER* EVP_camellia_256_cbc (void)"
371 .PP
372 The Camellia-256 cipher type
373 .PP
374 \fBReturns:\fP
375 .RS 4
376 the Camellia-256 EVP_CIPHER pointer. 
377 .RE
378 .PP
379
380 .SS "size_t EVP_CIPHER_block_size (const EVP_CIPHER * c)"
381 .PP
382 Return the block size of the cipher.
383 .PP
384 \fBParameters:\fP
385 .RS 4
386 \fIc\fP cipher to get the block size from.
387 .RE
388 .PP
389 \fBReturns:\fP
390 .RS 4
391 the block size of the cipher. 
392 .RE
393 .PP
394
395 .PP
396 \fBExamples: \fP
397 .in +1c
398 \fBexample_evp_cipher.c\fP.
399 .SS "size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX * ctx)"
400 .PP
401 Return the block size of the cipher context.
402 .PP
403 \fBParameters:\fP
404 .RS 4
405 \fIctx\fP cipher context to get the block size from.
406 .RE
407 .PP
408 \fBReturns:\fP
409 .RS 4
410 the block size of the cipher context. 
411 .RE
412 .PP
413
414 .SS "const EVP_CIPHER* EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX * ctx)"
415 .PP
416 Return the EVP_CIPHER for a EVP_CIPHER_CTX context.
417 .PP
418 \fBParameters:\fP
419 .RS 4
420 \fIctx\fP the context to get the cipher type from.
421 .RE
422 .PP
423 \fBReturns:\fP
424 .RS 4
425 the EVP_CIPHER pointer. 
426 .RE
427 .PP
428
429 .SS "int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX * c)"
430 .PP
431 Clean up the EVP_CIPHER_CTX context.
432 .PP
433 \fBParameters:\fP
434 .RS 4
435 \fIc\fP the cipher to clean up.
436 .RE
437 .PP
438 \fBReturns:\fP
439 .RS 4
440 1 on success. 
441 .RE
442 .PP
443
444 .PP
445 \fBExamples: \fP
446 .in +1c
447 \fBexample_evp_cipher.c\fP.
448 .SS "unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX * ctx)"
449 .PP
450 Get the flags for an EVP_CIPHER_CTX context.
451 .PP
452 \fBParameters:\fP
453 .RS 4
454 \fIctx\fP the EVP_CIPHER_CTX to get the flags from
455 .RE
456 .PP
457 \fBReturns:\fP
458 .RS 4
459 the flags for an EVP_CIPHER_CTX. 
460 .RE
461 .PP
462
463 .SS "void* EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX * ctx)"
464 .PP
465 Get the app data for an EVP_CIPHER_CTX context.
466 .PP
467 \fBParameters:\fP
468 .RS 4
469 \fIctx\fP the EVP_CIPHER_CTX to get the app data from
470 .RE
471 .PP
472 \fBReturns:\fP
473 .RS 4
474 the app data for an EVP_CIPHER_CTX. 
475 .RE
476 .PP
477
478 .SS "void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX * c)"
479 .PP
480 Initiate a EVP_CIPHER_CTX context. Clean up with \fBEVP_CIPHER_CTX_cleanup()\fP.
481 .PP
482 \fBParameters:\fP
483 .RS 4
484 \fIc\fP the cipher initiate. 
485 .RE
486 .PP
487
488 .PP
489 \fBExamples: \fP
490 .in +1c
491 \fBexample_evp_cipher.c\fP.
492 .SS "size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX * ctx)"
493 .PP
494 Return the IV size of the cipher context.
495 .PP
496 \fBParameters:\fP
497 .RS 4
498 \fIctx\fP cipher context to get the IV size from.
499 .RE
500 .PP
501 \fBReturns:\fP
502 .RS 4
503 the IV size of the cipher context. 
504 .RE
505 .PP
506
507 .SS "size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX * ctx)"
508 .PP
509 Return the key size of the cipher context.
510 .PP
511 \fBParameters:\fP
512 .RS 4
513 \fIctx\fP cipher context to get the key size from.
514 .RE
515 .PP
516 \fBReturns:\fP
517 .RS 4
518 the key size of the cipher context. 
519 .RE
520 .PP
521
522 .SS "int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX * ctx)"
523 .PP
524 Get the mode for an EVP_CIPHER_CTX context.
525 .PP
526 \fBParameters:\fP
527 .RS 4
528 \fIctx\fP the EVP_CIPHER_CTX to get the mode from
529 .RE
530 .PP
531 \fBReturns:\fP
532 .RS 4
533 the mode for an EVP_CIPHER_CTX. 
534 .RE
535 .PP
536
537 .SS "void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX * ctx, void * data)"
538 .PP
539 Set the app data for an EVP_CIPHER_CTX context.
540 .PP
541 \fBParameters:\fP
542 .RS 4
543 \fIctx\fP the EVP_CIPHER_CTX to set the app data for 
544 .br
545 \fIdata\fP the app data to set for an EVP_CIPHER_CTX. 
546 .RE
547 .PP
548
549 .SS "int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX * c, int length)"
550 .PP
551 If the cipher type supports it, change the key length
552 .PP
553 \fBParameters:\fP
554 .RS 4
555 \fIc\fP the cipher context to change the key length for 
556 .br
557 \fIlength\fP new key length
558 .RE
559 .PP
560 \fBReturns:\fP
561 .RS 4
562 1 on success. 
563 .RE
564 .PP
565
566 .SS "size_t EVP_CIPHER_iv_length (const EVP_CIPHER * c)"
567 .PP
568 Return the IV size of the cipher.
569 .PP
570 \fBParameters:\fP
571 .RS 4
572 \fIc\fP cipher to get the IV size from.
573 .RE
574 .PP
575 \fBReturns:\fP
576 .RS 4
577 the IV size of the cipher. 
578 .RE
579 .PP
580
581 .PP
582 \fBExamples: \fP
583 .in +1c
584 \fBexample_evp_cipher.c\fP.
585 .SS "size_t EVP_CIPHER_key_length (const EVP_CIPHER * c)"
586 .PP
587 Return the key size of the cipher.
588 .PP
589 \fBParameters:\fP
590 .RS 4
591 \fIc\fP cipher to get the key size from.
592 .RE
593 .PP
594 \fBReturns:\fP
595 .RS 4
596 the key size of the cipher. 
597 .RE
598 .PP
599
600 .PP
601 \fBExamples: \fP
602 .in +1c
603 \fBexample_evp_cipher.c\fP.
604 .SS "int EVP_CipherFinal_ex (EVP_CIPHER_CTX * ctx, void * out, int * outlen)"
605 .PP
606 Encipher/decipher final data
607 .PP
608 \fBParameters:\fP
609 .RS 4
610 \fIctx\fP the cipher context. 
611 .br
612 \fIout\fP output data from the operation. 
613 .br
614 \fIoutlen\fP output length
615 .RE
616 .PP
617 The input length needs to be at least \fBEVP_CIPHER_block_size()\fP bytes long.
618 .PP
619 See \fBEVP Cipher\fP for an example how to use this function.
620 .PP
621 \fBReturns:\fP
622 .RS 4
623 1 on success. 
624 .RE
625 .PP
626
627 .PP
628 \fBExamples: \fP
629 .in +1c
630 \fBexample_evp_cipher.c\fP.
631 .SS "int EVP_CipherInit_ex (EVP_CIPHER_CTX * ctx, const EVP_CIPHER * c, ENGINE * engine, const void * key, const void * iv, int encp)"
632 .PP
633 Initiate the EVP_CIPHER_CTX context to encrypt or decrypt data. Clean up with \fBEVP_CIPHER_CTX_cleanup()\fP.
634 .PP
635 \fBParameters:\fP
636 .RS 4
637 \fIctx\fP context to initiate 
638 .br
639 \fIc\fP cipher to use. 
640 .br
641 \fIengine\fP crypto engine to use, NULL to select default. 
642 .br
643 \fIkey\fP the crypto key to use, NULL will use the previous value. 
644 .br
645 \fIiv\fP the IV to use, NULL will use the previous value. 
646 .br
647 \fIencp\fP non zero will encrypt, -1 use the previous value.
648 .RE
649 .PP
650 \fBReturns:\fP
651 .RS 4
652 1 on success. 
653 .RE
654 .PP
655
656 .PP
657 \fBExamples: \fP
658 .in +1c
659 \fBexample_evp_cipher.c\fP.
660 .SS "int EVP_CipherUpdate (EVP_CIPHER_CTX * ctx, void * out, int * outlen, void * in, size_t inlen)"
661 .PP
662 Encipher/decipher partial data
663 .PP
664 \fBParameters:\fP
665 .RS 4
666 \fIctx\fP the cipher context. 
667 .br
668 \fIout\fP output data from the operation. 
669 .br
670 \fIoutlen\fP output length 
671 .br
672 \fIin\fP input data to the operation. 
673 .br
674 \fIinlen\fP length of data.
675 .RE
676 .PP
677 The output buffer length should at least be \fBEVP_CIPHER_block_size()\fP byte longer then the input length.
678 .PP
679 See \fBEVP Cipher\fP for an example how to use this function.
680 .PP
681 \fBReturns:\fP
682 .RS 4
683 1 on success. 
684 .RE
685 .PP
686
687 .PP
688 If there in no spare bytes in the left from last Update and the input length is on the block boundery, the \fBEVP_CipherUpdate()\fP function can take a shortcut (and preformance gain) and directly encrypt the data, otherwise we hav to fix it up and store extra it the EVP_CIPHER_CTX. 
689 .PP
690 \fBExamples: \fP
691 .in +1c
692 \fBexample_evp_cipher.c\fP.
693 .SS "const EVP_CIPHER* EVP_des_cbc (void)"
694 .PP
695 The DES cipher type
696 .PP
697 \fBReturns:\fP
698 .RS 4
699 the DES-CBC EVP_CIPHER pointer. 
700 .RE
701 .PP
702
703 .SS "const EVP_CIPHER* EVP_des_ede3_cbc (void)"
704 .PP
705 The tripple DES cipher type
706 .PP
707 \fBReturns:\fP
708 .RS 4
709 the DES-EDE3-CBC EVP_CIPHER pointer. 
710 .RE
711 .PP
712
713 .SS "int EVP_Digest (const void * data, size_t dsize, void * hash, unsigned int * hsize, const EVP_MD * md, ENGINE * engine)"
714 .PP
715 Do the whole \fBEVP_MD_CTX_create()\fP, \fBEVP_DigestInit_ex()\fP, \fBEVP_DigestUpdate()\fP, \fBEVP_DigestFinal_ex()\fP, \fBEVP_MD_CTX_destroy()\fP dance in one call.
716 .PP
717 \fBParameters:\fP
718 .RS 4
719 \fIdata\fP the data to update the context with 
720 .br
721 \fIdsize\fP length of data 
722 .br
723 \fIhash\fP output data of at least \fBEVP_MD_size()\fP length. 
724 .br
725 \fIhsize\fP output length of hash. 
726 .br
727 \fImd\fP message digest to use 
728 .br
729 \fIengine\fP engine to use, NULL for default engine.
730 .RE
731 .PP
732 \fBReturns:\fP
733 .RS 4
734 1 on success. 
735 .RE
736 .PP
737
738 .SS "int EVP_DigestFinal_ex (EVP_MD_CTX * ctx, void * hash, unsigned int * size)"
739 .PP
740 Complete the message digest.
741 .PP
742 \fBParameters:\fP
743 .RS 4
744 \fIctx\fP the context to complete. 
745 .br
746 \fIhash\fP the output of the message digest function. At least \fBEVP_MD_size()\fP. 
747 .br
748 \fIsize\fP the output size of hash.
749 .RE
750 .PP
751 \fBReturns:\fP
752 .RS 4
753 1 on success. 
754 .RE
755 .PP
756
757 .SS "int EVP_DigestInit_ex (EVP_MD_CTX * ctx, const EVP_MD * md, ENGINE * engine)"
758 .PP
759 Init a EVP_MD_CTX for use a specific message digest and engine.
760 .PP
761 \fBParameters:\fP
762 .RS 4
763 \fIctx\fP the message digest context to init. 
764 .br
765 \fImd\fP the message digest to use. 
766 .br
767 \fIengine\fP the engine to use, NULL to use the default engine.
768 .RE
769 .PP
770 \fBReturns:\fP
771 .RS 4
772 1 on success. 
773 .RE
774 .PP
775
776 .SS "int EVP_DigestUpdate (EVP_MD_CTX * ctx, const void * data, size_t size)"
777 .PP
778 Update the digest with some data.
779 .PP
780 \fBParameters:\fP
781 .RS 4
782 \fIctx\fP the context to update 
783 .br
784 \fIdata\fP the data to update the context with 
785 .br
786 \fIsize\fP length of data
787 .RE
788 .PP
789 \fBReturns:\fP
790 .RS 4
791 1 on success. 
792 .RE
793 .PP
794
795 .SS "const EVP_CIPHER* EVP_enc_null (void)"
796 .PP
797 The NULL cipher type, does no encryption/decryption.
798 .PP
799 \fBReturns:\fP
800 .RS 4
801 the null EVP_CIPHER pointer. 
802 .RE
803 .PP
804
805 .SS "const EVP_CIPHER* EVP_get_cipherbyname (const char * name)"
806 .PP
807 Get the cipher type using their name.
808 .PP
809 \fBParameters:\fP
810 .RS 4
811 \fIname\fP the name of the cipher.
812 .RE
813 .PP
814 \fBReturns:\fP
815 .RS 4
816 the selected EVP_CIPHER pointer or NULL if not found. 
817 .RE
818 .PP
819
820 .SS "const EVP_CIPHER* EVP_hcrypto_aes_128_cbc (void)"
821 .PP
822 The AES-128 cipher type (hcrypto)
823 .PP
824 \fBReturns:\fP
825 .RS 4
826 the AES-128 EVP_CIPHER pointer. 
827 .RE
828 .PP
829
830 .SS "const EVP_CIPHER* EVP_hcrypto_aes_128_cfb8 (void)"
831 .PP
832 The AES-128 CFB8 cipher type (hcrypto)
833 .PP
834 \fBReturns:\fP
835 .RS 4
836 the AES-128 EVP_CIPHER pointer. 
837 .RE
838 .PP
839
840 .SS "const EVP_CIPHER* EVP_hcrypto_aes_192_cbc (void)"
841 .PP
842 The AES-192 cipher type (hcrypto)
843 .PP
844 \fBReturns:\fP
845 .RS 4
846 the AES-192 EVP_CIPHER pointer. 
847 .RE
848 .PP
849
850 .SS "const EVP_CIPHER* EVP_hcrypto_aes_192_cfb8 (void)"
851 .PP
852 The AES-192 CFB8 cipher type (hcrypto)
853 .PP
854 \fBReturns:\fP
855 .RS 4
856 the AES-192 EVP_CIPHER pointer. 
857 .RE
858 .PP
859
860 .SS "const EVP_CIPHER* EVP_hcrypto_aes_256_cbc (void)"
861 .PP
862 The AES-256 cipher type (hcrypto)
863 .PP
864 \fBReturns:\fP
865 .RS 4
866 the AES-256 EVP_CIPHER pointer. 
867 .RE
868 .PP
869
870 .SS "const EVP_CIPHER* EVP_hcrypto_aes_256_cfb8 (void)"
871 .PP
872 The AES-256 CFB8 cipher type (hcrypto)
873 .PP
874 \fBReturns:\fP
875 .RS 4
876 the AES-256 EVP_CIPHER pointer. 
877 .RE
878 .PP
879
880 .SS "const EVP_CIPHER* EVP_hcrypto_camellia_128_cbc (void)"
881 .PP
882 The Camellia-128 cipher type - hcrypto
883 .PP
884 \fBReturns:\fP
885 .RS 4
886 the Camellia-128 EVP_CIPHER pointer. 
887 .RE
888 .PP
889
890 .SS "const EVP_CIPHER* EVP_hcrypto_camellia_192_cbc (void)"
891 .PP
892 The Camellia-198 cipher type - hcrypto
893 .PP
894 \fBReturns:\fP
895 .RS 4
896 the Camellia-198 EVP_CIPHER pointer. 
897 .RE
898 .PP
899
900 .SS "const EVP_CIPHER* EVP_hcrypto_camellia_256_cbc (void)"
901 .PP
902 The Camellia-256 cipher type - hcrypto
903 .PP
904 \fBReturns:\fP
905 .RS 4
906 the Camellia-256 EVP_CIPHER pointer. 
907 .RE
908 .PP
909
910 .SS "const EVP_CIPHER* EVP_hcrypto_des_cbc (void)"
911 .PP
912 The DES cipher type
913 .PP
914 \fBReturns:\fP
915 .RS 4
916 the DES-CBC EVP_CIPHER pointer. 
917 .RE
918 .PP
919
920 .SS "const EVP_CIPHER* EVP_hcrypto_des_ede3_cbc (void)"
921 .PP
922 The tripple DES cipher type - hcrypto
923 .PP
924 \fBReturns:\fP
925 .RS 4
926 the DES-EDE3-CBC EVP_CIPHER pointer. 
927 .RE
928 .PP
929
930 .SS "const EVP_MD* EVP_hcrypto_md2 (void)"
931 .PP
932 The message digest MD2 - hcrypto
933 .PP
934 \fBReturns:\fP
935 .RS 4
936 the message digest type. 
937 .RE
938 .PP
939
940 .SS "const EVP_MD* EVP_hcrypto_md4 (void)"
941 .PP
942 The message digest MD4 - hcrypto
943 .PP
944 \fBReturns:\fP
945 .RS 4
946 the message digest type. 
947 .RE
948 .PP
949
950 .SS "const EVP_MD* EVP_hcrypto_md5 (void)"
951 .PP
952 The message digest MD5 - hcrypto
953 .PP
954 \fBReturns:\fP
955 .RS 4
956 the message digest type. 
957 .RE
958 .PP
959
960 .SS "const EVP_CIPHER* EVP_hcrypto_rc2_40_cbc (void)"
961 .PP
962 The RC2-40 cipher type
963 .PP
964 \fBReturns:\fP
965 .RS 4
966 the RC2-40 EVP_CIPHER pointer. 
967 .RE
968 .PP
969
970 .SS "const EVP_CIPHER* EVP_hcrypto_rc2_64_cbc (void)"
971 .PP
972 The RC2-64 cipher type
973 .PP
974 \fBReturns:\fP
975 .RS 4
976 the RC2-64 EVP_CIPHER pointer. 
977 .RE
978 .PP
979
980 .SS "const EVP_CIPHER* EVP_hcrypto_rc2_cbc (void)"
981 .PP
982 The RC2 cipher type - hcrypto
983 .PP
984 \fBReturns:\fP
985 .RS 4
986 the RC2 EVP_CIPHER pointer. 
987 .RE
988 .PP
989
990 .SS "const EVP_MD* EVP_hcrypto_sha1 (void)"
991 .PP
992 The message digest SHA1 - hcrypto
993 .PP
994 \fBReturns:\fP
995 .RS 4
996 the message digest type. 
997 .RE
998 .PP
999
1000 .SS "const EVP_MD* EVP_hcrypto_sha256 (void)"
1001 .PP
1002 The message digest SHA256 - hcrypto
1003 .PP
1004 \fBReturns:\fP
1005 .RS 4
1006 the message digest type. 
1007 .RE
1008 .PP
1009
1010 .SS "const EVP_MD* EVP_hcrypto_sha384 (void)"
1011 .PP
1012 The message digest SHA384 - hcrypto
1013 .PP
1014 \fBReturns:\fP
1015 .RS 4
1016 the message digest type. 
1017 .RE
1018 .PP
1019
1020 .SS "const EVP_MD* EVP_hcrypto_sha512 (void)"
1021 .PP
1022 The message digest SHA512 - hcrypto
1023 .PP
1024 \fBReturns:\fP
1025 .RS 4
1026 the message digest type. 
1027 .RE
1028 .PP
1029
1030 .SS "const EVP_MD* EVP_md2 (void)"
1031 .PP
1032 The message digest MD2
1033 .PP
1034 \fBReturns:\fP
1035 .RS 4
1036 the message digest type. 
1037 .RE
1038 .PP
1039
1040 .SS "const EVP_MD* EVP_md4 (void)"
1041 .PP
1042 The message digest MD4
1043 .PP
1044 \fBReturns:\fP
1045 .RS 4
1046 the message digest type. 
1047 .RE
1048 .PP
1049
1050 .SS "const EVP_MD* EVP_md5 (void)"
1051 .PP
1052 The message digest MD5
1053 .PP
1054 \fBReturns:\fP
1055 .RS 4
1056 the message digest type. 
1057 .RE
1058 .PP
1059
1060 .SS "size_t EVP_MD_block_size (const EVP_MD * md)"
1061 .PP
1062 Return the blocksize of the message digest function.
1063 .PP
1064 \fBParameters:\fP
1065 .RS 4
1066 \fImd\fP the evp message
1067 .RE
1068 .PP
1069 \fBReturns:\fP
1070 .RS 4
1071 size size of the message digest block size 
1072 .RE
1073 .PP
1074
1075 .SS "size_t EVP_MD_CTX_block_size (EVP_MD_CTX * ctx)"
1076 .PP
1077 Return the blocksize of the message digest function.
1078 .PP
1079 \fBParameters:\fP
1080 .RS 4
1081 \fIctx\fP the evp message digest context
1082 .RE
1083 .PP
1084 \fBReturns:\fP
1085 .RS 4
1086 size size of the message digest block size 
1087 .RE
1088 .PP
1089
1090 .SS "int EVP_MD_CTX_cleanup (EVP_MD_CTX * ctx)"
1091 .PP
1092 Free the resources used by the EVP_MD context.
1093 .PP
1094 \fBParameters:\fP
1095 .RS 4
1096 \fIctx\fP the context to free the resources from.
1097 .RE
1098 .PP
1099 \fBReturns:\fP
1100 .RS 4
1101 1 on success. 
1102 .RE
1103 .PP
1104
1105 .SS "EVP_MD_CTX* EVP_MD_CTX_create (void)"
1106 .PP
1107 Allocate a messsage digest context object. Free with \fBEVP_MD_CTX_destroy()\fP.
1108 .PP
1109 \fBReturns:\fP
1110 .RS 4
1111 a newly allocated message digest context object. 
1112 .RE
1113 .PP
1114
1115 .SS "void EVP_MD_CTX_destroy (EVP_MD_CTX * ctx)"
1116 .PP
1117 Free a messsage digest context object.
1118 .PP
1119 \fBParameters:\fP
1120 .RS 4
1121 \fIctx\fP context to free. 
1122 .RE
1123 .PP
1124
1125 .SS "void EVP_MD_CTX_init (EVP_MD_CTX * ctx)"
1126 .PP
1127 Initiate a messsage digest context object. Deallocate with \fBEVP_MD_CTX_cleanup()\fP. Please use \fBEVP_MD_CTX_create()\fP instead.
1128 .PP
1129 \fBParameters:\fP
1130 .RS 4
1131 \fIctx\fP variable to initiate. 
1132 .RE
1133 .PP
1134
1135 .SS "const EVP_MD* EVP_MD_CTX_md (EVP_MD_CTX * ctx)"
1136 .PP
1137 Get the EVP_MD use for a specified context.
1138 .PP
1139 \fBParameters:\fP
1140 .RS 4
1141 \fIctx\fP the EVP_MD context to get the EVP_MD for.
1142 .RE
1143 .PP
1144 \fBReturns:\fP
1145 .RS 4
1146 the EVP_MD used for the context. 
1147 .RE
1148 .PP
1149
1150 .SS "size_t EVP_MD_CTX_size (EVP_MD_CTX * ctx)"
1151 .PP
1152 Return the output size of the message digest function.
1153 .PP
1154 \fBParameters:\fP
1155 .RS 4
1156 \fIctx\fP the evp message digest context
1157 .RE
1158 .PP
1159 \fBReturns:\fP
1160 .RS 4
1161 size output size of the message digest function. 
1162 .RE
1163 .PP
1164
1165 .SS "const EVP_MD* EVP_md_null (void)"
1166 .PP
1167 The null message digest
1168 .PP
1169 \fBReturns:\fP
1170 .RS 4
1171 the message digest type. 
1172 .RE
1173 .PP
1174
1175 .SS "size_t EVP_MD_size (const EVP_MD * md)"
1176 .PP
1177 Return the output size of the message digest function.
1178 .PP
1179 \fBParameters:\fP
1180 .RS 4
1181 \fImd\fP the evp message
1182 .RE
1183 .PP
1184 \fBReturns:\fP
1185 .RS 4
1186 size output size of the message digest function. 
1187 .RE
1188 .PP
1189
1190 .SS "const EVP_CIPHER* EVP_rc2_40_cbc (void)"
1191 .PP
1192 The RC2 cipher type
1193 .PP
1194 \fBReturns:\fP
1195 .RS 4
1196 the RC2 EVP_CIPHER pointer. 
1197 .RE
1198 .PP
1199
1200 .SS "const EVP_CIPHER* EVP_rc2_64_cbc (void)"
1201 .PP
1202 The RC2 cipher type
1203 .PP
1204 \fBReturns:\fP
1205 .RS 4
1206 the RC2 EVP_CIPHER pointer. 
1207 .RE
1208 .PP
1209
1210 .SS "const EVP_CIPHER* EVP_rc2_cbc (void)"
1211 .PP
1212 The RC2 cipher type
1213 .PP
1214 \fBReturns:\fP
1215 .RS 4
1216 the RC2 EVP_CIPHER pointer. 
1217 .RE
1218 .PP
1219
1220 .SS "const EVP_CIPHER* EVP_rc4 (void)"
1221 .PP
1222 The RC4 cipher type
1223 .PP
1224 \fBReturns:\fP
1225 .RS 4
1226 the RC4 EVP_CIPHER pointer. 
1227 .RE
1228 .PP
1229
1230 .SS "const EVP_CIPHER* EVP_rc4_40 (void)"
1231 .PP
1232 The RC4-40 cipher type
1233 .PP
1234 \fBReturns:\fP
1235 .RS 4
1236 the RC4-40 EVP_CIPHER pointer. 
1237 .RE
1238 .PP
1239
1240 .SS "const EVP_MD* EVP_sha (void)"
1241 .PP
1242 The message digest SHA1
1243 .PP
1244 \fBReturns:\fP
1245 .RS 4
1246 the message digest type. 
1247 .RE
1248 .PP
1249
1250 .SS "const EVP_MD* EVP_sha1 (void)"
1251 .PP
1252 The message digest SHA1
1253 .PP
1254 \fBReturns:\fP
1255 .RS 4
1256 the message digest type. 
1257 .RE
1258 .PP
1259
1260 .SS "const EVP_MD* EVP_sha256 (void)"
1261 .PP
1262 The message digest SHA256
1263 .PP
1264 \fBReturns:\fP
1265 .RS 4
1266 the message digest type. 
1267 .RE
1268 .PP
1269
1270 .SS "const EVP_MD* EVP_sha384 (void)"
1271 .PP
1272 The message digest SHA384
1273 .PP
1274 \fBReturns:\fP
1275 .RS 4
1276 the message digest type. 
1277 .RE
1278 .PP
1279
1280 .SS "const EVP_MD* EVP_sha512 (void)"
1281 .PP
1282 The message digest SHA512
1283 .PP
1284 \fBReturns:\fP
1285 .RS 4
1286 the message digest type. 
1287 .RE
1288 .PP
1289
1290 .SS "const EVP_CIPHER* EVP_wincrypt_des_ede3_cbc (void)"
1291 .PP
1292 The tripple DES cipher type (Micrsoft crypt provider)
1293 .PP
1294 \fBReturns:\fP
1295 .RS 4
1296 the DES-EDE3-CBC EVP_CIPHER pointer. 
1297 .RE
1298 .PP
1299