srtp.c File Reference
#include "libavutil/base64.h"
#include "libavutil/aes.h"
#include "libavutil/hmac.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "rtp.h"
#include "rtpdec.h"
#include "srtp.h"
Include dependency graph for srtp.c:

Go to the source code of this file.

Functions

void ff_srtp_free (struct SRTPContext *s)
 
static void encrypt_counter (struct AVAES *aes, uint8_t *iv, uint8_t *outbuf, int outlen)
 
static void derive_key (struct AVAES *aes, const uint8_t *salt, int label, uint8_t *out, int outlen)
 
int ff_srtp_set_crypto (struct SRTPContext *s, const char *suite, const char *params)
 
static void create_iv (uint8_t *iv, const uint8_t *salt, uint64_t index, uint32_t ssrc)
 
int ff_srtp_decrypt (struct SRTPContext *s, uint8_t *buf, int *lenptr)
 
int ff_srtp_encrypt (struct SRTPContext *s, const uint8_t *in, int len, uint8_t *out, int outlen)
 

Function Documentation

static void create_iv ( uint8_t iv,
const uint8_t salt,
uint64_t  index,
uint32_t  ssrc 
)
static

Definition at line 112 of file srtp.c.

Referenced by ff_srtp_decrypt(), and ff_srtp_encrypt().

static void derive_key ( struct AVAES aes,
const uint8_t salt,
int  label,
uint8_t out,
int  outlen 
)
static

Definition at line 54 of file srtp.c.

Referenced by ff_srtp_set_crypto().

static void encrypt_counter ( struct AVAES aes,
uint8_t iv,
uint8_t outbuf,
int  outlen 
)
static

Definition at line 41 of file srtp.c.

Referenced by derive_key(), ff_srtp_decrypt(), and ff_srtp_encrypt().

int ff_srtp_decrypt ( struct SRTPContext s,
uint8_t buf,
int *  lenptr 
)

Definition at line 126 of file srtp.c.

Referenced by ff_rtp_parse_packet(), ff_srtp_encrypt(), and srtp_read().

int ff_srtp_encrypt ( struct SRTPContext s,
const uint8_t in,
int  len,
uint8_t out,
int  outlen 
)

Definition at line 238 of file srtp.c.

Referenced by ff_srtp_encrypt(), and srtp_write().

void ff_srtp_free ( struct SRTPContext s)

Definition at line 31 of file srtp.c.

Referenced by ff_rtp_parse_close(), ff_srtp_encrypt(), ff_srtp_set_crypto(), and srtp_close().

int ff_srtp_set_crypto ( struct SRTPContext s,
const char *  suite,
const char *  params 
)

Definition at line 65 of file srtp.c.

Referenced by ff_rtp_parse_set_crypto(), ff_srtp_encrypt(), and srtp_open().