Lines Matching defs:md
450 static void md_add_uint8(gcry_md_hd_t md, uint8_t v) {
451 gcry_md_write(md, &v, sizeof(v));
454 static void md_add_uint16(gcry_md_hd_t md, uint16_t v) {
456 gcry_md_write(md, &v, sizeof(v));
459 static void md_add_uint32(gcry_md_hd_t md, uint32_t v) {
461 gcry_md_write(md, &v, sizeof(v));
624 gcry_md_hd_t md = NULL;
745 gcry_md_open(&md, md_algorithm, 0);
746 if (!md)
749 md_add_uint16(md, rrsig->rrsig.type_covered);
750 md_add_uint8(md, rrsig->rrsig.algorithm);
751 md_add_uint8(md, rrsig->rrsig.labels);
752 md_add_uint32(md, rrsig->rrsig.original_ttl);
753 md_add_uint32(md, rrsig->rrsig.expiration);
754 md_add_uint32(md, rrsig->rrsig.inception);
755 md_add_uint16(md, rrsig->rrsig.key_tag);
760 gcry_md_write(md, wire_format_name, r);
774 gcry_md_write(md, (uint8_t[]) { 1, '*'}, 2);
775 gcry_md_write(md, wire_format_name, r);
777 md_add_uint16(md, rr->key->type);
778 md_add_uint16(md, rr->key->class);
779 md_add_uint32(md, rrsig->rrsig.original_ttl);
784 md_add_uint16(md, (uint16_t) l);
785 gcry_md_write(md, DNS_RESOURCE_RECORD_RDATA(rr), l);
788 hash = gcry_md_read(md, 0);
835 gcry_md_close(md);
1047 gcry_md_hd_t md = NULL;
1089 gcry_md_open(&md, md_algorithm, 0);
1090 if (!md)
1093 gcry_md_write(md, owner_name, r);
1095 md_add_uint16(md, dnskey->dnskey.flags & ~DNSKEY_FLAG_REVOKE);
1097 md_add_uint16(md, dnskey->dnskey.flags);
1098 md_add_uint8(md, dnskey->dnskey.protocol);
1099 md_add_uint8(md, dnskey->dnskey.algorithm);
1100 gcry_md_write(md, dnskey->dnskey.key, dnskey->dnskey.key_size);
1102 result = gcry_md_read(md, 0);
1111 gcry_md_close(md);
1169 gcry_md_hd_t md = NULL;
1204 gcry_md_open(&md, algorithm, 0);
1205 if (!md)
1208 gcry_md_write(md, wire_format, r);
1209 gcry_md_write(md, nsec3->nsec3.salt, nsec3->nsec3.salt_size);
1211 result = gcry_md_read(md, 0);
1221 gcry_md_reset(md);
1222 gcry_md_write(md, tmp, hash_size);
1223 gcry_md_write(md, nsec3->nsec3.salt, nsec3->nsec3.salt_size);
1225 result = gcry_md_read(md, 0);
1236 gcry_md_close(md);