FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
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 "srtp.h"

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

void ff_srtp_free ( struct SRTPContext s)

Definition at line 30 of file srtp.c.

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

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

Definition at line 40 of file srtp.c.

Referenced by derive_key(), 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 53 of file srtp.c.

Referenced by ff_srtp_set_crypto().

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

Definition at line 64 of file srtp.c.

Referenced by ff_rtp_parse_set_crypto(), and srtp_open().

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

Definition at line 111 of file srtp.c.

Referenced by ff_srtp_decrypt(), and ff_srtp_encrypt().

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

Definition at line 125 of file srtp.c.

Referenced by ff_rtp_parse_packet(), and srtp_read().

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

Definition at line 237 of file srtp.c.

Referenced by srtp_write().