• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/libgcrypt-1.5.0/cipher/

Lines Matching refs:hd

158 static gcry_err_code_t md_enable (gcry_md_hd_t hd, int algo);
436 gcry_md_hd_t hd;
459 hd = gcry_malloc_secure (n + sizeof (struct gcry_md_context));
461 hd = gcry_malloc (n + sizeof (struct gcry_md_context));
463 if (! hd)
468 hd->ctx = ctx = (struct gcry_md_context *) ((char *) hd + n);
470 hd->bufsize = n - sizeof (struct gcry_md_handle) + 1;
471 hd->bufpos = 0;
474 memset (hd->ctx, 0, sizeof *hd->ctx);
495 md_close (hd);
507 err = md_enable (hd, algo);
509 md_close (hd);
514 *h = hd;
528 gcry_md_hd_t hd;
534 err = md_open (&hd, algo, (flags & GCRY_MD_FLAG_SECURE),
538 *h = err? NULL : hd;
545 md_enable (gcry_md_hd_t hd, int algorithm)
547 struct gcry_md_context *h = hd->ctx;
624 gcry_md_enable (gcry_md_hd_t hd, int algorithm)
626 return gcry_error (md_enable (hd, algorithm));
718 gcry_md_copy (gcry_md_hd_t *handle, gcry_md_hd_t hd)
722 err = md_copy (hd, handle);
780 gcry_md_close (gcry_md_hd_t hd)
783 md_close (hd);
809 gcry_md_write (gcry_md_hd_t hd, const void *inbuf, size_t inlen)
811 md_write (hd, inbuf, inlen);
853 prepare_macpads (gcry_md_hd_t hd, const unsigned char *key, size_t keylen)
856 int algo = md_get_algo (hd);
863 if ( keylen > hd->ctx->macpads_Bsize )
871 gcry_assert ( keylen <= hd->ctx->macpads_Bsize );
874 memset ( hd->ctx->macpads, 0, 2*(hd->ctx->macpads_Bsize) );
875 ipad = hd->ctx->macpads;
876 opad = (hd->ctx->macpads)+(hd->ctx->macpads_Bsize);
879 for (i=0; i < hd->ctx->macpads_Bsize; i++ )
890 gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen)
897 md_final (hd);
900 rc = gcry_err_code (gcry_md_setkey (hd, buffer, buflen));
903 md_start_debug (hd, buffer);
906 md_stop_debug ( hd );
915 gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen)
919 if (!hd->ctx->macpads)
923 rc = prepare_macpads (hd, key, keylen);
925 gcry_md_reset (hd);
935 gcry_md_debug (gcry_md_hd_t hd, const char *suffix)
938 md_start_debug (hd, suffix);
940 md_stop_debug (hd);
978 gcry_md_read (gcry_md_hd_t hd, int algo)
983 gcry_md_ctl (hd, GCRYCTL_FINALIZE, NULL, 0);
984 return md_read (hd, algo);
992 gcry_md_get (gcry_md_hd_t hd, int algo, byte *buffer, int buflen)
994 (void)hd;
1062 gcry_md_get_algo (gcry_md_hd_t hd)
1064 return md_get_algo (hd);