2014-05-05 18:40:06 +00:00
|
|
|
/**
|
|
|
|
* @file re_srtp.h Secure Real-time Transport Protocol (SRTP)
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Creytiv.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
enum srtp_suite {
|
|
|
|
SRTP_AES_CM_128_HMAC_SHA1_32,
|
|
|
|
SRTP_AES_CM_128_HMAC_SHA1_80,
|
|
|
|
SRTP_AES_256_CM_HMAC_SHA1_32,
|
|
|
|
SRTP_AES_256_CM_HMAC_SHA1_80,
|
2018-03-09 14:21:47 +01:00
|
|
|
SRTP_AES_128_GCM,
|
|
|
|
SRTP_AES_256_GCM,
|
2014-05-05 18:40:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum srtp_flags {
|
|
|
|
SRTP_UNENCRYPTED_SRTCP = 1<<1,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct srtp;
|
|
|
|
|
|
|
|
int srtp_alloc(struct srtp **srtpp, enum srtp_suite suite,
|
|
|
|
const uint8_t *key, size_t key_bytes, int flags);
|
|
|
|
int srtp_encrypt(struct srtp *srtp, struct mbuf *mb);
|
|
|
|
int srtp_decrypt(struct srtp *srtp, struct mbuf *mb);
|
|
|
|
int srtcp_encrypt(struct srtp *srtp, struct mbuf *mb);
|
|
|
|
int srtcp_decrypt(struct srtp *srtp, struct mbuf *mb);
|
2014-06-12 10:51:53 +00:00
|
|
|
|
|
|
|
const char *srtp_suite_name(enum srtp_suite suite);
|