Lines Matching defs:buf
68 uint8_t buf[30];
87 if (av_base64_decode(buf, params, sizeof(buf)) != sizeof(buf)) {
96 memcpy(s->master_key, buf, 16);
97 memcpy(s->master_salt, buf + 16, 14);
126 int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr)
140 rtcp = RTP_PT_IS_RTCP(buf[1]);
149 av_hmac_update(s->hmac, buf, len - hmac_size);
152 int seq = AV_RB16(buf + 2);
179 if (memcmp(hmac, buf + len - hmac_size, hmac_size)) {
191 uint32_t srtcp_index = AV_RB32(buf + len - 4);
195 ssrc = AV_RB32(buf + 4);
198 buf += 8;
208 csrc = buf[0] & 0x0f;
209 ext = buf[0] & 0x10;
210 ssrc = AV_RB32(buf + 8);
212 buf += 12;
215 buf += 4 * csrc;
223 ext = (AV_RB16(buf + 2) + 1) * 4;
227 buf += ext;
233 encrypt_counter(s->aes, iv, buf, len);
245 uint8_t *buf;
260 buf = out;
263 ssrc = AV_RB32(buf + 4);
266 buf += 8;
270 int seq = AV_RB16(buf + 2);
275 ssrc = AV_RB32(buf + 8);
282 csrc = buf[0] & 0x0f;
283 ext = buf[0] & 0x10;
285 buf += 12;
288 buf += 4 * csrc;
296 ext = (AV_RB16(buf + 2) + 1) * 4;
300 buf += ext;
306 encrypt_counter(s->aes, iv, buf, len);
309 AV_WB32(buf + len, 0x80000000 | index);
314 av_hmac_update(s->hmac, out, buf + len - out);
322 memcpy(buf + len, hmac, hmac_size);
324 return buf + len - out;