Lines Matching refs:hmac
428 unsigned char *hmac; in ldns_key_new_frm_fp_l() local
647 hmac = ldns_key_new_frm_fp_hmac_l(fp, line_nr, &hmac_size); in ldns_key_new_frm_fp_l()
648 if (!hmac) { in ldns_key_new_frm_fp_l()
653 ldns_key_set_hmac_key(k, hmac); in ldns_key_new_frm_fp_l()
1102 unsigned char *hmac; in ldns_key_new_frm_algorithm() local
1199 hmac = LDNS_XMALLOC(unsigned char, size); in ldns_key_new_frm_algorithm()
1200 if(!hmac) { in ldns_key_new_frm_algorithm()
1205 if (RAND_bytes(hmac, (int) size) != 1) { in ldns_key_new_frm_algorithm()
1206 LDNS_FREE(hmac); in ldns_key_new_frm_algorithm()
1213 memcpy(&hmac[offset], &i, sizeof(i)); in ldns_key_new_frm_algorithm()
1218 memcpy(&hmac[offset], &i, size - offset); in ldns_key_new_frm_algorithm()
1221 ldns_key_set_hmac_key(k, hmac); in ldns_key_new_frm_algorithm()
1398 ldns_key_set_hmac_key(ldns_key *k, unsigned char *hmac) in ldns_key_set_hmac_key() argument
1400 k->_key.hmac.key = hmac; in ldns_key_set_hmac_key()
1406 k->_key.hmac.size = hmac_size; in ldns_key_set_hmac_size()
1523 if (k->_key.hmac.key) { in ldns_key_hmac_key()
1524 return k->_key.hmac.key; in ldns_key_hmac_key()
1533 if (k->_key.hmac.size) { in ldns_key_hmac_size()
1534 return k->_key.hmac.size; in ldns_key_hmac_size()
2056 unsigned char* hmac; in ldns_key_deep_free() local
2066 hmac = ldns_key_hmac_key(key); in ldns_key_deep_free()
2067 LDNS_FREE(hmac); in ldns_key_deep_free()