Lines Matching refs:hmac
5 * and give a general interface for private keys and hmac
48 { LDNS_SIGN_HMACMD5, "hmac-md5.sig-alg.reg.int" },
49 { LDNS_SIGN_HMACSHA1, "hmac-sha1" },
50 { LDNS_SIGN_HMACSHA256, "hmac-sha256" },
51 { LDNS_SIGN_HMACSHA224, "hmac-sha224" },
52 { LDNS_SIGN_HMACSHA384, "hmac-sha384" },
53 { LDNS_SIGN_HMACSHA512, "hmac-sha512" },
465 unsigned char *hmac;
684 hmac = ldns_key_new_frm_fp_hmac_l(fp, line_nr, &hmac_size);
685 if (!hmac) {
690 ldns_key_set_hmac_key(k, hmac);
1143 unsigned char *hmac;
1240 hmac = LDNS_XMALLOC(unsigned char, size);
1241 if(!hmac) {
1246 if (RAND_bytes(hmac, (int) size) != 1) {
1247 LDNS_FREE(hmac);
1254 memcpy(&hmac[offset], &i, sizeof(i));
1259 memcpy(&hmac[offset], &i, size - offset);
1262 ldns_key_set_hmac_key(k, hmac);
1451 ldns_key_set_hmac_key(ldns_key *k, unsigned char *hmac)
1453 k->_key.hmac.key = hmac;
1459 k->_key.hmac.size = hmac_size;
1576 if (k->_key.hmac.key) {
1577 return k->_key.hmac.key;
1586 if (k->_key.hmac.size) {
1587 return k->_key.hmac.size;
2073 unsigned char* hmac;
2083 hmac = ldns_key_hmac_key(key);
2084 LDNS_FREE(hmac);