Lines Matching refs:hmac
24 #include "hmac.h"
190 static void test(AVHMAC *hmac, const uint8_t *key, int keylen,
201 out = av_hmac_calc(hmac, data, datalen, key, keylen, buf, sizeof(buf));
219 AVHMAC *hmac = av_hmac_alloc(AV_HMAC_MD5);
220 if (!hmac)
226 test(hmac, key1, 16, data1, sizeof(data1));
227 test(hmac, key2, sizeof(key2), data2, sizeof(data2));
228 test(hmac, key3, 16, data3, sizeof(data3));
229 test(hmac, key3, 80, data4, sizeof(data4));
230 test(hmac, key3, 80, data5, sizeof(data5));
231 av_hmac_free(hmac);
234 hmac = av_hmac_alloc(AV_HMAC_SHA1);
235 if (!hmac)
238 test(hmac, key1, sizeof(key1), data1, sizeof(data1));
239 test(hmac, key2, sizeof(key2), data2, sizeof(data2));
240 test(hmac, key3, 20, data3, sizeof(data3));
241 test(hmac, key3, 80, data4, sizeof(data4));
242 test(hmac, key3, 80, data5, sizeof(data5));
243 av_hmac_free(hmac);
247 hmac = av_hmac_alloc(i);
249 test(hmac, key1, sizeof(key1), data1, sizeof(data1));
250 test(hmac, key2, sizeof(key2), data2, sizeof(data2));
251 test(hmac, key3, 20, data3, sizeof(data3));
252 test(hmac, key3, sizeof(key3), data4, sizeof(data4));
253 test(hmac, key3, sizeof(key3), data6, sizeof(data6));
254 av_hmac_free(hmac);