nrfxlib API 0.1.0
Loading...
Searching...
No Matches
ocrypto_srtp.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "ocrypto_aes_key.h"

Go to the source code of this file.

Data Structures

struct  ocrypto_srtp_ctx
 

Macros

#define ocrypto_srtp_AUTH_KEY_SIZE   (20)
 
#define ocrypto_srtp_SALT_SIZE   (14)
 
#define ocrypto_srtp_MAX_KEY_SIZE   (ocrypto_aes256_KEY_BYTES)
 

Functions

void ocrypto_srtp_setup_ctx (ocrypto_srtp_ctx *srtp_ctx, ocrypto_srtp_ctx *srtcp_ctx, const uint8_t *key, uint32_t key_size, const uint8_t *salt, uint32_t tag_size, uint32_t ssrc)
 
void ocrypto_srtp_encrypt (const ocrypto_srtp_ctx *srtp_ctx, uint8_t *packet, const uint8_t *data_bytes, size_t num_header_bytes, size_t num_data_bytes, uint32_t index)
 
void ocrypto_srtp_decrypt (const ocrypto_srtp_ctx *srtp_ctx, uint8_t *data, const uint8_t *packet_bytes, size_t num_packet_bytes, uint32_t index)
 
void ocrypto_srtp_authenticate (const ocrypto_srtp_ctx *srtp_ctx, uint8_t *tag, const uint8_t *bytes, size_t num_bytes, uint32_t index)
 
int ocrypto_srtp_verify_authentication (const ocrypto_srtp_ctx *srtp_ctx, const uint8_t *tag, const uint8_t *bytes, size_t num_bytes, uint32_t index)