Lines Matching defs:srtp
24 #include "libavformat/srtp.h"
103 static int test_decrypt(struct SRTPContext *srtp, const uint8_t *in, int len,
107 if (!ff_srtp_decrypt(srtp, out, &len)) {
142 struct SRTPContext srtp = { 0 };
144 ff_srtp_set_crypto(&srtp, aes128_80_suite, aes128_80_key);
145 len = test_decrypt(&srtp, rtp_aes128_80, sizeof(rtp_aes128_80), buf);
149 test_decrypt(&srtp, rtcp_aes128_80, sizeof(rtcp_aes128_80), buf);
153 ff_srtp_free(&srtp);
155 memset(&srtp, 0, sizeof(srtp)); // Clear the context
156 ff_srtp_set_crypto(&srtp, aes128_32_suite, aes128_32_key);
157 test_decrypt(&srtp, rtp_aes128_32, sizeof(rtp_aes128_32), buf);
158 test_decrypt(&srtp, rtcp_aes128_32, sizeof(rtcp_aes128_32), buf);
159 ff_srtp_free(&srtp);
161 memset(&srtp, 0, sizeof(srtp)); // Clear the context
162 ff_srtp_set_crypto(&srtp, aes128_80_32_suite, aes128_80_32_key);
163 test_decrypt(&srtp, rtp_aes128_80_32, sizeof(rtp_aes128_80_32), buf);
164 test_decrypt(&srtp, rtcp_aes128_80_32, sizeof(rtcp_aes128_80_32), buf);
165 ff_srtp_free(&srtp);