• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/libgcrypt-1.5.0/cipher/

Lines Matching defs:digest

1 /* md.c  -  message digest dispatcher
39 /* This is the list of the digest implementations included in
43 gcry_md_spec_t *digest;
114 gcry_md_spec_t *digest;
181 for (i = 0; !err && digest_table[i].digest; i++)
194 (void *) digest_table[i].digest,
207 gcry_md_spec_t *digest = (gcry_md_spec_t *) spec;
210 return (! stricmp (digest->name, name));
217 gcry_md_spec_t *digest = (gcry_md_spec_t *) spec;
219 gcry_md_oid_spec_t *oid_specs = digest->oids;
232 /* Internal function. Lookup a digest entry by it's name. */
236 gcry_module_t digest;
238 digest = _gcry_module_lookup (digests_registered, (void *) name,
241 return digest;
248 gcry_module_t digest;
250 digest = _gcry_module_lookup (digests_registered, (void *) oid,
253 return digest;
256 /* Register a new digest module whose specification can be found in
260 _gcry_md_register (gcry_md_spec_t *digest,
274 (void *) digest,
288 /* Unregister the digest identified by ID, which must have been
312 gcry_md_spec_t *digest = module->spec;
315 for (i = 0; digest->oids[i].oidstring && !ret; i++)
316 if (! stricmp (oid, digest->oids[i].oidstring))
321 *oid_spec = digest->oids[i];
331 * Map a string to the digest algo
336 gcry_module_t digest;
353 /* Not found, search a matching digest name. */
354 digest = gcry_md_lookup_name (string);
355 if (digest)
357 algorithm = digest->mod_id;
358 _gcry_module_release (digest);
368 * Map a digest algo to a string
374 gcry_module_t digest;
379 digest = _gcry_module_lookup_id (digests_registered, algorithm);
380 if (digest)
382 name = ((gcry_md_spec_t *) digest->spec)->name;
383 _gcry_module_release (digest);
408 gcry_module_t digest;
413 digest = _gcry_module_lookup_id (digests_registered, algorithm);
414 if (digest)
415 _gcry_module_release (digest);
426 * Open a message digest handle for use with algorithm ALGO.
519 /* Create a message digest object for algorithm ALGO. FLAGS may be
548 gcry_md_spec_t *digest = NULL;
568 digest = (gcry_md_spec_t *) module->spec;
585 + digest->contextsize
598 entry->digest = digest;
605 entry->digest->init (&entry->context.c);
683 + ar->digest->contextsize
687 + ar->digest->contextsize
696 memcpy (br, ar, (sizeof (*br) + ar->digest->contextsize
743 memset (r->context.c, 0, r->digest->contextsize);
744 (*r->digest->init) (&r->context.c);
802 (*r->digest->write) (&r->context.c, a->buf, a->bufpos);
803 (*r->digest->write) (&r->context.c, inbuf, inlen);
826 (*r->digest->final) (&r->context.c);
846 /* Replace our digest with the mac (they have the same size). */
946 * if ALGO is null get the digest for the used algo (which should be only one)
960 return r->digest->read (&r->context.c);
967 return r->digest->read (&r->context.c);
974 * Read out the complete digest, this function implictly finalizes
980 /* This function is expected to always return a digest, thus we
989 * Read out an intermediate digest. Not yet functional.
1008 * supplied digest buffer must be large enough to store the resulting
1012 gcry_md_hash_buffer (int algo, void *digest,
1016 _gcry_sha1_hash_buffer (digest, buffer, length);
1018 _gcry_rmd160_hash_buffer (digest, buffer, length);
1043 memcpy (digest, md_read (h, algo), md_digest_length (algo));
1069 * Return the length of the digest
1074 gcry_module_t digest;
1080 digest = _gcry_module_lookup_id (digests_registered, algorithm);
1081 if (digest)
1083 mdlen = ((gcry_md_spec_t *) digest->spec)->mdlen;
1084 _gcry_module_release (digest);
1092 * Return the length of the digest in bytes.
1108 gcry_module_t digest;
1113 digest = _gcry_module_lookup_id (digests_registered, algorithm);
1114 if (digest)
1117 *asnlen = ((gcry_md_spec_t *) digest->spec)->asnlen;
1119 *mdlen = ((gcry_md_spec_t *) digest->spec)->mdlen;
1120 asnoid = ((gcry_md_spec_t *) digest->spec)->asnoid;
1121 _gcry_module_release (digest);
1243 * Return information about the digest handle.
1328 /* Get a list consisting of the IDs of the loaded message digest
1330 digest modules to LIST_LENGTH and return. If LIST is non-zero, the
1332 of according size. In case there are less message digest modules
1348 /* Run the selftests for digest algorithm ALGO with optional reporting
1370 report ("digest", algo, "module",