webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Typedefs | Enumerations | Functions
cipher.h File Reference
#include "srtp.h"
#include "crypto_types.h"

Go to the source code of this file.

Classes

struct  srtp_cipher_test_case_t
 
struct  srtp_cipher_type_t
 
struct  srtp_cipher_t
 

Typedefs

typedef struct srtp_cipher_tsrtp_cipher_pointer_t
 
typedef srtp_err_status_t(* srtp_cipher_alloc_func_t) (srtp_cipher_pointer_t *cp, int key_len, int tag_len)
 
typedef srtp_err_status_t(* srtp_cipher_init_func_t) (void *state, const uint8_t *key)
 
typedef srtp_err_status_t(* srtp_cipher_dealloc_func_t) (srtp_cipher_pointer_t cp)
 
typedef srtp_err_status_t(* srtp_cipher_set_aad_func_t) (void *state, const uint8_t *aad, uint32_t aad_len)
 
typedef srtp_err_status_t(* srtp_cipher_encrypt_func_t) (void *state, uint8_t *buffer, unsigned int *octets_to_encrypt)
 
typedef srtp_err_status_t(* srtp_cipher_decrypt_func_t) (void *state, uint8_t *buffer, unsigned int *octets_to_decrypt)
 
typedef srtp_err_status_t(* srtp_cipher_set_iv_func_t) (void *state, uint8_t *iv, srtp_cipher_direction_t direction)
 
typedef srtp_err_status_t(* srtp_cipher_get_tag_func_t) (void *state, uint8_t *tag, uint32_t *len)
 
typedef struct srtp_cipher_test_case_t srtp_cipher_test_case_t
 
typedef struct srtp_cipher_type_t srtp_cipher_type_t
 
typedef struct srtp_cipher_t srtp_cipher_t
 

Enumerations

enum  srtp_cipher_direction_t { srtp_direction_encrypt, srtp_direction_decrypt, srtp_direction_any }
 

Functions

int srtp_cipher_get_key_length (const srtp_cipher_t *c)
 
srtp_err_status_t srtp_cipher_type_self_test (const srtp_cipher_type_t *ct)
 
srtp_err_status_t srtp_cipher_type_test (const srtp_cipher_type_t *ct, const srtp_cipher_test_case_t *test_data)
 
uint64_t srtp_cipher_bits_per_second (srtp_cipher_t *c, int octets_in_buffer, int num_trials)
 
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)
 
srtp_err_status_t srtp_replace_cipher_type (const srtp_cipher_type_t *ct, srtp_cipher_type_id_t id)
 

Typedef Documentation

◆ srtp_cipher_alloc_func_t

typedef srtp_err_status_t(* srtp_cipher_alloc_func_t) (srtp_cipher_pointer_t *cp, int key_len, int tag_len)

◆ srtp_cipher_dealloc_func_t

typedef srtp_err_status_t(* srtp_cipher_dealloc_func_t) (srtp_cipher_pointer_t cp)

◆ srtp_cipher_decrypt_func_t

typedef srtp_err_status_t(* srtp_cipher_decrypt_func_t) (void *state, uint8_t *buffer, unsigned int *octets_to_decrypt)

◆ srtp_cipher_encrypt_func_t

typedef srtp_err_status_t(* srtp_cipher_encrypt_func_t) (void *state, uint8_t *buffer, unsigned int *octets_to_encrypt)

◆ srtp_cipher_get_tag_func_t

typedef srtp_err_status_t(* srtp_cipher_get_tag_func_t) (void *state, uint8_t *tag, uint32_t *len)

◆ srtp_cipher_init_func_t

typedef srtp_err_status_t(* srtp_cipher_init_func_t) (void *state, const uint8_t *key)

◆ srtp_cipher_pointer_t

◆ srtp_cipher_set_aad_func_t

typedef srtp_err_status_t(* srtp_cipher_set_aad_func_t) (void *state, const uint8_t *aad, uint32_t aad_len)

◆ srtp_cipher_set_iv_func_t

typedef srtp_err_status_t(* srtp_cipher_set_iv_func_t) (void *state, uint8_t *iv, srtp_cipher_direction_t direction)

◆ srtp_cipher_t

◆ srtp_cipher_test_case_t

◆ srtp_cipher_type_t

Enumeration Type Documentation

◆ srtp_cipher_direction_t

Enumerator
srtp_direction_encrypt 

encryption (convert plaintext to ciphertext)

srtp_direction_decrypt 

decryption (convert ciphertext to plaintext)

srtp_direction_any 

encryption or decryption

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 
)

◆ srtp_replace_cipher_type()

srtp_err_status_t srtp_replace_cipher_type ( const srtp_cipher_type_t ct,
srtp_cipher_type_id_t  id 
)