Lines Matching refs:ctx

74 static void md2_starts_wrap( void *ctx )  in md2_starts_wrap()  argument
76 mbedtls_md2_starts( (mbedtls_md2_context *) ctx ); in md2_starts_wrap()
79 static void md2_update_wrap( void *ctx, const unsigned char *input, in md2_update_wrap() argument
82 mbedtls_md2_update( (mbedtls_md2_context *) ctx, input, ilen ); in md2_update_wrap()
85 static void md2_finish_wrap( void *ctx, unsigned char *output ) in md2_finish_wrap() argument
87 mbedtls_md2_finish( (mbedtls_md2_context *) ctx, output ); in md2_finish_wrap()
92 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md2_context ) ); in md2_ctx_alloc() local
94 if( ctx != NULL ) in md2_ctx_alloc()
95 mbedtls_md2_init( (mbedtls_md2_context *) ctx ); in md2_ctx_alloc()
97 return( ctx ); in md2_ctx_alloc()
100 static void md2_ctx_free( void *ctx ) in md2_ctx_free() argument
102 mbedtls_md2_free( (mbedtls_md2_context *) ctx ); in md2_ctx_free()
103 mbedtls_free( ctx ); in md2_ctx_free()
112 static void md2_process_wrap( void *ctx, const unsigned char *data ) in md2_process_wrap() argument
116 mbedtls_md2_process( (mbedtls_md2_context *) ctx ); in md2_process_wrap()
138 static void md4_starts_wrap( void *ctx ) in md4_starts_wrap() argument
140 mbedtls_md4_starts( (mbedtls_md4_context *) ctx ); in md4_starts_wrap()
143 static void md4_update_wrap( void *ctx, const unsigned char *input, in md4_update_wrap() argument
146 mbedtls_md4_update( (mbedtls_md4_context *) ctx, input, ilen ); in md4_update_wrap()
149 static void md4_finish_wrap( void *ctx, unsigned char *output ) in md4_finish_wrap() argument
151 mbedtls_md4_finish( (mbedtls_md4_context *) ctx, output ); in md4_finish_wrap()
156 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md4_context ) ); in md4_ctx_alloc() local
158 if( ctx != NULL ) in md4_ctx_alloc()
159 mbedtls_md4_init( (mbedtls_md4_context *) ctx ); in md4_ctx_alloc()
161 return( ctx ); in md4_ctx_alloc()
164 static void md4_ctx_free( void *ctx ) in md4_ctx_free() argument
166 mbedtls_md4_free( (mbedtls_md4_context *) ctx ); in md4_ctx_free()
167 mbedtls_free( ctx ); in md4_ctx_free()
176 static void md4_process_wrap( void *ctx, const unsigned char *data ) in md4_process_wrap() argument
178 mbedtls_md4_process( (mbedtls_md4_context *) ctx, data ); in md4_process_wrap()
200 static void md5_starts_wrap( void *ctx ) in md5_starts_wrap() argument
202 mbedtls_md5_starts( (mbedtls_md5_context *) ctx ); in md5_starts_wrap()
205 static void md5_update_wrap( void *ctx, const unsigned char *input, in md5_update_wrap() argument
208 mbedtls_md5_update( (mbedtls_md5_context *) ctx, input, ilen ); in md5_update_wrap()
211 static void md5_finish_wrap( void *ctx, unsigned char *output ) in md5_finish_wrap() argument
213 mbedtls_md5_finish( (mbedtls_md5_context *) ctx, output ); in md5_finish_wrap()
218 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md5_context ) ); in md5_ctx_alloc() local
220 if( ctx != NULL ) in md5_ctx_alloc()
221 mbedtls_md5_init( (mbedtls_md5_context *) ctx ); in md5_ctx_alloc()
223 return( ctx ); in md5_ctx_alloc()
226 static void md5_ctx_free( void *ctx ) in md5_ctx_free() argument
228 mbedtls_md5_free( (mbedtls_md5_context *) ctx ); in md5_ctx_free()
229 mbedtls_free( ctx ); in md5_ctx_free()
238 static void md5_process_wrap( void *ctx, const unsigned char *data ) in md5_process_wrap() argument
240 mbedtls_md5_process( (mbedtls_md5_context *) ctx, data ); in md5_process_wrap()
262 static void ripemd160_starts_wrap( void *ctx ) in ripemd160_starts_wrap() argument
264 mbedtls_ripemd160_starts( (mbedtls_ripemd160_context *) ctx ); in ripemd160_starts_wrap()
267 static void ripemd160_update_wrap( void *ctx, const unsigned char *input, in ripemd160_update_wrap() argument
270 mbedtls_ripemd160_update( (mbedtls_ripemd160_context *) ctx, input, ilen ); in ripemd160_update_wrap()
273 static void ripemd160_finish_wrap( void *ctx, unsigned char *output ) in ripemd160_finish_wrap() argument
275 mbedtls_ripemd160_finish( (mbedtls_ripemd160_context *) ctx, output ); in ripemd160_finish_wrap()
280 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ripemd160_context ) ); in ripemd160_ctx_alloc() local
282 if( ctx != NULL ) in ripemd160_ctx_alloc()
283 mbedtls_ripemd160_init( (mbedtls_ripemd160_context *) ctx ); in ripemd160_ctx_alloc()
285 return( ctx ); in ripemd160_ctx_alloc()
288 static void ripemd160_ctx_free( void *ctx ) in ripemd160_ctx_free() argument
290 mbedtls_ripemd160_free( (mbedtls_ripemd160_context *) ctx ); in ripemd160_ctx_free()
291 mbedtls_free( ctx ); in ripemd160_ctx_free()
300 static void ripemd160_process_wrap( void *ctx, const unsigned char *data ) in ripemd160_process_wrap() argument
302 mbedtls_ripemd160_process( (mbedtls_ripemd160_context *) ctx, data ); in ripemd160_process_wrap()
324 static void sha1_starts_wrap( void *ctx ) in sha1_starts_wrap() argument
326 mbedtls_sha1_starts( (mbedtls_sha1_context *) ctx ); in sha1_starts_wrap()
329 static void sha1_update_wrap( void *ctx, const unsigned char *input, in sha1_update_wrap() argument
332 mbedtls_sha1_update( (mbedtls_sha1_context *) ctx, input, ilen ); in sha1_update_wrap()
335 static void sha1_finish_wrap( void *ctx, unsigned char *output ) in sha1_finish_wrap() argument
337 mbedtls_sha1_finish( (mbedtls_sha1_context *) ctx, output ); in sha1_finish_wrap()
342 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha1_context ) ); in sha1_ctx_alloc() local
344 if( ctx != NULL ) in sha1_ctx_alloc()
345 mbedtls_sha1_init( (mbedtls_sha1_context *) ctx ); in sha1_ctx_alloc()
347 return( ctx ); in sha1_ctx_alloc()
356 static void sha1_ctx_free( void *ctx ) in sha1_ctx_free() argument
358 mbedtls_sha1_free( (mbedtls_sha1_context *) ctx ); in sha1_ctx_free()
359 mbedtls_free( ctx ); in sha1_ctx_free()
362 static void sha1_process_wrap( void *ctx, const unsigned char *data ) in sha1_process_wrap() argument
364 mbedtls_sha1_process( (mbedtls_sha1_context *) ctx, data ); in sha1_process_wrap()
389 static void sha224_starts_wrap( void *ctx ) in sha224_starts_wrap() argument
391 mbedtls_sha256_starts( (mbedtls_sha256_context *) ctx, 1 ); in sha224_starts_wrap()
394 static void sha224_update_wrap( void *ctx, const unsigned char *input, in sha224_update_wrap() argument
397 mbedtls_sha256_update( (mbedtls_sha256_context *) ctx, input, ilen ); in sha224_update_wrap()
400 static void sha224_finish_wrap( void *ctx, unsigned char *output ) in sha224_finish_wrap() argument
402 mbedtls_sha256_finish( (mbedtls_sha256_context *) ctx, output ); in sha224_finish_wrap()
413 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha256_context ) ); in sha224_ctx_alloc() local
415 if( ctx != NULL ) in sha224_ctx_alloc()
416 mbedtls_sha256_init( (mbedtls_sha256_context *) ctx ); in sha224_ctx_alloc()
418 return( ctx ); in sha224_ctx_alloc()
421 static void sha224_ctx_free( void *ctx ) in sha224_ctx_free() argument
423 mbedtls_sha256_free( (mbedtls_sha256_context *) ctx ); in sha224_ctx_free()
424 mbedtls_free( ctx ); in sha224_ctx_free()
433 static void sha224_process_wrap( void *ctx, const unsigned char *data ) in sha224_process_wrap() argument
435 mbedtls_sha256_process( (mbedtls_sha256_context *) ctx, data ); in sha224_process_wrap()
453 static void sha256_starts_wrap( void *ctx ) in sha256_starts_wrap() argument
455 mbedtls_sha256_starts( (mbedtls_sha256_context *) ctx, 0 ); in sha256_starts_wrap()
483 static void sha384_starts_wrap( void *ctx ) in sha384_starts_wrap() argument
485 mbedtls_sha512_starts( (mbedtls_sha512_context *) ctx, 1 ); in sha384_starts_wrap()
488 static void sha384_update_wrap( void *ctx, const unsigned char *input, in sha384_update_wrap() argument
491 mbedtls_sha512_update( (mbedtls_sha512_context *) ctx, input, ilen ); in sha384_update_wrap()
494 static void sha384_finish_wrap( void *ctx, unsigned char *output ) in sha384_finish_wrap() argument
496 mbedtls_sha512_finish( (mbedtls_sha512_context *) ctx, output ); in sha384_finish_wrap()
507 void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha512_context ) ); in sha384_ctx_alloc() local
509 if( ctx != NULL ) in sha384_ctx_alloc()
510 mbedtls_sha512_init( (mbedtls_sha512_context *) ctx ); in sha384_ctx_alloc()
512 return( ctx ); in sha384_ctx_alloc()
515 static void sha384_ctx_free( void *ctx ) in sha384_ctx_free() argument
517 mbedtls_sha512_free( (mbedtls_sha512_context *) ctx ); in sha384_ctx_free()
518 mbedtls_free( ctx ); in sha384_ctx_free()
527 static void sha384_process_wrap( void *ctx, const unsigned char *data ) in sha384_process_wrap() argument
529 mbedtls_sha512_process( (mbedtls_sha512_context *) ctx, data ); in sha384_process_wrap()
547 static void sha512_starts_wrap( void *ctx ) in sha512_starts_wrap() argument
549 mbedtls_sha512_starts( (mbedtls_sha512_context *) ctx, 0 ); in sha512_starts_wrap()