Lines Matching refs:md_data
280 } MD_DATA;
282 static int dev_crypto_init_digest(MD_DATA *md_data,int mac)
284 if(!dev_crypto_init(&md_data->sess))
287 md_data->len=0;
288 md_data->data=NULL;
290 md_data->sess.mac=mac;
292 if (ioctl(fd,CIOCGSESSION,&md_data->sess) == -1)
300 static int dev_crypto_cleanup_digest(MD_DATA *md_data)
302 if (ioctl(fd,CIOCFSESSION,&md_data->sess.ses) == -1)
314 { return dev_crypto_init_digest(ctx->md_data,CRYPTO_MD5); }
374 MD_DATA *md_data=ctx->md_data;
377 return do_digest(md_data->sess.ses,md_data->md,data,len);
379 md_data->data=OPENSSL_realloc(md_data->data,md_data->len+len);
380 memcpy(md_data->data+md_data->len,data,len);
381 md_data->len+=len;
389 MD_DATA *md_data=ctx->md_data;
393 memcpy(md,md_data->md,MD5_DIGEST_LENGTH);
398 ret=do_digest(md_data->sess.ses,md,md_data->data,md_data->len);
399 OPENSSL_free(md_data->data);
400 md_data->data=NULL;
401 md_data->len=0;
409 const MD_DATA *from_md=from->md_data;
410 MD_DATA *to_md=to->md_data;
423 return dev_crypto_cleanup_digest(ctx->md_data);
439 sizeof(MD_DATA),