@ -9,7 +9,6 @@
# include "str.h"
# include "str.h"
# include "aux.h"
# include "aux.h"
# define SRTP_MAX_MASTER_KEY_LEN 32
# define SRTP_MAX_MASTER_KEY_LEN 32
# define SRTP_MAX_MASTER_SALT_LEN 14
# define SRTP_MAX_MASTER_SALT_LEN 14
# define SRTP_MAX_SESSION_KEY_LEN 32
# define SRTP_MAX_SESSION_KEY_LEN 32
@ -107,11 +106,22 @@ extern __thread GString *crypto_debug_string;
void crypto_init_main ( void ) ;
void crypto_init_main ( void ) ;
const struct crypto_suite * crypto_find_suite ( const str * ) ;
const struct crypto_suite * crypto_find_suite ( const str * ) ;
int crypto_gen_session_key ( struct crypto_context * , str * , unsigned char , int ) ;
int crypto_gen_session_key ( struct crypto_context * , str * , unsigned char , int ) ;
void crypto_dump_keys ( struct crypto_context * in , struct crypto_context * out ) ;
void crypto_dump_keys ( struct crypto_context * in , struct crypto_context * out ) ;
char * crypto_params_sdes_dump ( const struct crypto_params_sdes * , char * * ) ;
char * crypto_params_sdes_dump ( const struct crypto_params_sdes * , char * * ) ;
/**
* A function which compares two crypto suite names in str format .
* Recommended to be used in combination with :
* g_queue_find_custom ( ) or g_list_find_custom ( )
*/
INLINE int crypto_params_sdes_cmp ( gconstpointer a , gconstpointer b )
{
const struct crypto_params_sdes * cs = a ;
return str_cmp_str ( & cs - > params . crypto_suite - > name_str , ( str * ) b ) ;
}
INLINE int crypto_encrypt_rtp ( struct crypto_context * c , struct rtp_header * rtp ,
INLINE int crypto_encrypt_rtp ( struct crypto_context * c , struct rtp_header * rtp ,