webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions | Variables
cipher.c File Reference
#include "cipher.h"
#include "crypto_types.h"
#include "err.h"
#include "alloc.h"

Macros

#define SELF_TEST_BUF_OCTETS   128
 
#define NUM_RAND_TESTS   128
 
#define MAX_KEY_LEN   64
 

Functions

srtp_err_status_t srtp_cipher_type_alloc (const srtp_cipher_type_t *ct, srtp_cipher_t **c, int key_len, int tlen)
 
srtp_err_status_t srtp_cipher_dealloc (srtp_cipher_t *c)
 
srtp_err_status_t srtp_cipher_init (srtp_cipher_t *c, const uint8_t *key)
 
srtp_err_status_t srtp_cipher_set_iv (srtp_cipher_t *c, uint8_t *iv, int direction)
 
srtp_err_status_t srtp_cipher_output (srtp_cipher_t *c, uint8_t *buffer, uint32_t *num_octets_to_output)
 
srtp_err_status_t srtp_cipher_encrypt (srtp_cipher_t *c, uint8_t *buffer, uint32_t *num_octets_to_output)
 
srtp_err_status_t srtp_cipher_decrypt (srtp_cipher_t *c, uint8_t *buffer, uint32_t *num_octets_to_output)
 
srtp_err_status_t srtp_cipher_get_tag (srtp_cipher_t *c, uint8_t *buffer, uint32_t *tag_len)
 
srtp_err_status_t srtp_cipher_set_aad (srtp_cipher_t *c, const uint8_t *aad, uint32_t aad_len)
 
int srtp_cipher_get_key_length (const srtp_cipher_t *c)
 
srtp_err_status_t srtp_cipher_type_test (const srtp_cipher_type_t *ct, const srtp_cipher_test_case_t *test_data)
 
srtp_err_status_t srtp_cipher_type_self_test (const srtp_cipher_type_t *ct)
 
uint64_t srtp_cipher_bits_per_second (srtp_cipher_t *c, int octets_in_buffer, int num_trials)
 

Variables

srtp_debug_module_t srtp_mod_cipher
 

Macro Definition Documentation

◆ MAX_KEY_LEN

#define MAX_KEY_LEN   64

◆ NUM_RAND_TESTS

#define NUM_RAND_TESTS   128

◆ SELF_TEST_BUF_OCTETS

#define SELF_TEST_BUF_OCTETS   128

Function Documentation

◆ srtp_cipher_bits_per_second()

uint64_t srtp_cipher_bits_per_second ( srtp_cipher_t c,
int  octets_in_buffer,
int  num_trials 
)

◆ srtp_cipher_dealloc()

srtp_err_status_t srtp_cipher_dealloc ( srtp_cipher_t c)

◆ srtp_cipher_decrypt()

srtp_err_status_t srtp_cipher_decrypt ( srtp_cipher_t c,
uint8_t buffer,
uint32_t num_octets_to_output 
)

◆ srtp_cipher_encrypt()

srtp_err_status_t srtp_cipher_encrypt ( srtp_cipher_t c,
uint8_t buffer,
uint32_t num_octets_to_output 
)

◆ srtp_cipher_get_key_length()

int srtp_cipher_get_key_length ( const srtp_cipher_t c)

◆ srtp_cipher_get_tag()

srtp_err_status_t srtp_cipher_get_tag ( srtp_cipher_t c,
uint8_t buffer,
uint32_t tag_len 
)

◆ srtp_cipher_init()

srtp_err_status_t srtp_cipher_init ( srtp_cipher_t c,
const uint8_t key 
)

◆ srtp_cipher_output()

srtp_err_status_t srtp_cipher_output ( srtp_cipher_t c,
uint8_t buffer,
uint32_t num_octets_to_output 
)

◆ srtp_cipher_set_aad()

srtp_err_status_t srtp_cipher_set_aad ( srtp_cipher_t c,
const uint8_t aad,
uint32_t  aad_len 
)

◆ srtp_cipher_set_iv()

srtp_err_status_t srtp_cipher_set_iv ( srtp_cipher_t c,
uint8_t iv,
int  direction 
)

◆ srtp_cipher_type_alloc()

srtp_err_status_t srtp_cipher_type_alloc ( const srtp_cipher_type_t ct,
srtp_cipher_t **  c,
int  key_len,
int  tlen 
)

◆ srtp_cipher_type_self_test()

srtp_err_status_t srtp_cipher_type_self_test ( const srtp_cipher_type_t ct)

◆ srtp_cipher_type_test()

srtp_err_status_t srtp_cipher_type_test ( const srtp_cipher_type_t ct,
const srtp_cipher_test_case_t test_data 
)

Variable Documentation

◆ srtp_mod_cipher

srtp_debug_module_t srtp_mod_cipher
Initial value:
= {
0,
"cipher"
}