Lines Matching refs:hmac
24 static void test(AVHMAC *hmac, const uint8_t *key, int keylen, in test() argument
35 out = av_hmac_calc(hmac, data, datalen, key, keylen, buf, sizeof(buf)); in test()
44 AVHMAC *hmac; in main() local
60 hmac = av_hmac_alloc(i); in main()
61 if (!hmac) in main()
64 test(hmac, key1, hmac->hashlen, data1, sizeof(data1)); in main()
65 test(hmac, key2, sizeof(key2), data2, sizeof(data2)); in main()
66 test(hmac, key3, hmac->hashlen, data3, sizeof(data3)); in main()
67 test(hmac, key3, 80, data4, sizeof(data4)); in main()
68 test(hmac, key3, 80, data5, sizeof(data5)); in main()
69 av_hmac_free(hmac); in main()
74 hmac = av_hmac_alloc(i); in main()
75 if (!hmac) in main()
78 test(hmac, key1, sizeof(key1), data1, sizeof(data1)); in main()
79 test(hmac, key2, sizeof(key2), data2, sizeof(data2)); in main()
80 test(hmac, key3, 20, data3, sizeof(data3)); in main()
81 test(hmac, key3, sizeof(key3), data4, sizeof(data4)); in main()
82 test(hmac, key3, sizeof(key3), data6, sizeof(data6)); in main()
83 av_hmac_free(hmac); in main()