|
Revision 7788eb792526b6ff51d4fb9c899fcf27dff55f1e, 2.5 kB
(checked in by Rémi Denis-Courmont <rdenis@simphalempin.com>, 3 months ago)
|
SRTP: support for parsing key and salt from a string
|
- Property mode set to
100644
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
#ifndef LIBVLC_SRTP_H |
|---|
| 21 |
# define LIBVLC_SRTP_H 1 |
|---|
| 22 |
|
|---|
| 23 |
typedef struct srtp_session_t srtp_session_t; |
|---|
| 24 |
|
|---|
| 25 |
enum |
|---|
| 26 |
{ |
|---|
| 27 |
SRTP_UNENCRYPTED=0x1, |
|---|
| 28 |
SRTCP_UNENCRYPTED=0x2, |
|---|
| 29 |
SRTP_UNAUTHENTICATED=0x4, |
|---|
| 30 |
|
|---|
| 31 |
SRTP_RCC_MODE1=0x10, |
|---|
| 32 |
SRTP_RCC_MODE2=0x20, |
|---|
| 33 |
SRTP_RCC_MODE3=0x30, |
|---|
| 34 |
|
|---|
| 35 |
SRTP_FLAGS_MASK=0x38 |
|---|
| 36 |
}; |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
enum |
|---|
| 40 |
{ |
|---|
| 41 |
SRTP_ENCR_NULL=0, |
|---|
| 42 |
SRTP_ENCR_AES_CM=1, |
|---|
| 43 |
SRTP_ENCR_AES_F8=2 |
|---|
| 44 |
}; |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
enum |
|---|
| 48 |
{ |
|---|
| 49 |
SRTP_AUTH_NULL=0, |
|---|
| 50 |
SRTP_AUTH_HMAC_SHA1=1 |
|---|
| 51 |
}; |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
enum |
|---|
| 55 |
{ |
|---|
| 56 |
SRTP_PRF_AES_CM=0 |
|---|
| 57 |
}; |
|---|
| 58 |
|
|---|
| 59 |
# ifdef __cplusplus |
|---|
| 60 |
extern "C" { |
|---|
| 61 |
# endif |
|---|
| 62 |
|
|---|
| 63 |
srtp_session_t *srtp_create (int encr, int auth, unsigned tag_len, int prf, |
|---|
| 64 |
unsigned flags); |
|---|
| 65 |
void srtp_destroy (srtp_session_t *s); |
|---|
| 66 |
|
|---|
| 67 |
int srtp_setkey (srtp_session_t *s, const void *key, size_t keylen, |
|---|
| 68 |
const void *salt, size_t saltlen); |
|---|
| 69 |
int srtp_setkeystring (srtp_session_t *s, const char *key, const char *salt); |
|---|
| 70 |
|
|---|
| 71 |
void srtp_setrcc_rate (srtp_session_t *s, uint16_t rate); |
|---|
| 72 |
|
|---|
| 73 |
int srtp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t maxsize); |
|---|
| 74 |
int srtp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp); |
|---|
| 75 |
int srtcp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t maxsiz); |
|---|
| 76 |
int srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp); |
|---|
| 77 |
|
|---|
| 78 |
# ifdef __cplusplus |
|---|
| 79 |
} |
|---|
| 80 |
# endif |
|---|
| 81 |
#endif |
|---|
| 82 |
|
|---|