Logo Search packages:      
Sourcecode: srtp version File versions  Download package

void crypto_policy_set_rtp_default ( crypto_policy_t p  ) 

crypto_policy_set_rtp_default() sets a crypto policy structure to the SRTP default policy for RTP protection.

p is a pointer to the policy structure to be set
The function call crypto_policy_set_rtp_default(&p) sets the crypto_policy_t at location p to the SRTP default policy for RTP protection, as defined in the specification. This function is a convenience that helps to avoid dealing directly with the policy data structure. You are encouraged to initialize policy elements with this function call. Doing so may allow your code to be forward compatible with later versions of libSRTP that include more elements in the crypto_policy_t datatype.


Definition at line 1326 of file srtp.c.

References AES_128_ICM, crypto_policy_t::auth_key_len, crypto_policy_t::auth_tag_len, crypto_policy_t::auth_type, crypto_policy_t::cipher_key_len, crypto_policy_t::cipher_type, HMAC_SHA1, crypto_policy_t::sec_serv, and sec_serv_conf_and_auth.


  p->cipher_type     = AES_128_ICM;           
  p->cipher_key_len  = 30;                /* default 128 bits per RFC 3711 */
  p->auth_type       = HMAC_SHA1;             
  p->auth_key_len    = 20;                /* default 160 bits per RFC 3711 */
  p->auth_tag_len    = 10;                /* default 80 bits per RFC 3711 */
  p->sec_serv        = sec_serv_conf_and_auth;

Generated by  Doxygen 1.6.0   Back to index