Janus
Home
Demos
Documentation
Cite us!
Support
Community
rtpsrtp.h
Go to the documentation of this file.
1
13
#ifndef _JANUS_RTPSRTP_H
14
#define _JANUS_RTPSRTP_H
15
16
#ifdef HAVE_SRTP_2
17
#include <srtp2/srtp.h>
18
#include <openssl/rand.h>
19
#include <openssl/err.h>
20
int
srtp_crypto_get_random
(uint8_t *key,
int
len);
21
#else
22
#include <srtp/srtp.h>
23
#include <srtp/crypto_kernel.h>
24
#define srtp_err_status_t err_status_t
25
#define srtp_err_status_ok err_status_ok
26
#define srtp_err_status_replay_fail err_status_replay_fail
27
#define srtp_err_status_replay_old err_status_replay_old
28
#define srtp_crypto_policy_set_rtp_default crypto_policy_set_rtp_default
29
#define srtp_crypto_policy_set_rtcp_default crypto_policy_set_rtcp_default
30
#define srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32 crypto_policy_set_aes_cm_128_hmac_sha1_32
31
#define srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80 crypto_policy_set_aes_cm_128_hmac_sha1_80
32
#define srtp_crypto_get_random crypto_get_random
33
#endif
34
35
/* SRTP stuff (http://tools.ietf.org/html/rfc3711) */
36
#define SRTP_MASTER_KEY_LENGTH 16
37
#define SRTP_MASTER_SALT_LENGTH 14
38
#define SRTP_MASTER_LENGTH (SRTP_MASTER_KEY_LENGTH + SRTP_MASTER_SALT_LENGTH)
39
40
44
const
char
*
janus_srtp_error_str
(
int
error);
45
46
#endif
janus_srtp_error_str
const char * janus_srtp_error_str(int error)
Helper method to get a string representation of a libsrtp error code.
Definition:
rtp.c:391
srtp_crypto_get_random
#define srtp_crypto_get_random
Definition:
rtpsrtp.h:32