Lines Matching refs:hmac
36 if (s->hmac) in ff_srtp_free()
37 av_hmac_free(s->hmac); in ff_srtp_free()
38 s->hmac = NULL; in ff_srtp_free()
93 s->hmac = av_hmac_alloc(AV_HMAC_SHA1); in ff_srtp_set_crypto()
94 if (!s->aes || !s->hmac) in ff_srtp_set_crypto()
128 uint8_t iv[16] = { 0 }, hmac[20]; in ff_srtp_decrypt() local
147 av_hmac_init(s->hmac, rtcp ? s->rtcp_auth : s->rtp_auth, sizeof(s->rtp_auth)); in ff_srtp_decrypt()
149 av_hmac_update(s->hmac, buf, len - hmac_size); in ff_srtp_decrypt()
175 av_hmac_update(s->hmac, rocbuf, 4); in ff_srtp_decrypt()
178 av_hmac_final(s->hmac, hmac, sizeof(hmac)); in ff_srtp_decrypt()
179 if (memcmp(hmac, buf + len - hmac_size, hmac_size)) { in ff_srtp_decrypt()
241 uint8_t iv[16] = { 0 }, hmac[20]; in ff_srtp_encrypt() local
313 av_hmac_init(s->hmac, rtcp ? s->rtcp_auth : s->rtp_auth, sizeof(s->rtp_auth)); in ff_srtp_encrypt()
314 av_hmac_update(s->hmac, out, buf + len - out); in ff_srtp_encrypt()
318 av_hmac_update(s->hmac, rocbuf, 4); in ff_srtp_encrypt()
320 av_hmac_final(s->hmac, hmac, sizeof(hmac)); in ff_srtp_encrypt()
322 memcpy(buf + len, hmac, hmac_size); in ff_srtp_encrypt()