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

void crypto_policy_set_null_cipher_hmac_sha1_80 ( crypto_policy_t p  ) 

crypto_policy_set_null_cipher_hmac_sha1_80() sets a crypto policy structure to an authentication-only policy

Parameters:
p is a pointer to the policy structure to be set
The function call crypto_policy_set_null_cipher_hmac_sha1_80(&p) sets the crypto_policy_t at location p to use HMAC-SHA1 with an 80 bit authentication tag to provide message authentication, but to use no encryption. This policy is NOT RECOMMENDED for SRTP unless there is a requirement to forego encryption.

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.

Warning:
This policy is NOT RECOMMENDED for SRTP unless there is a requirement to forego encryption.
Returns:
void.

Definition at line 1399 of file srtp.c.

References 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, NULL_CIPHER, crypto_policy_t::sec_serv, and sec_serv_auth.

Referenced by crypto_policy_set_from_profile_for_rtcp(), and crypto_policy_set_from_profile_for_rtp().

                                                               {

  /*
   * corresponds to draft-ietf-mmusic-sdescriptions-12.txt
   */

  p->cipher_type     = NULL_CIPHER;           
  p->cipher_key_len  = 0;
  p->auth_type       = HMAC_SHA1;             
  p->auth_key_len    = 20; 
  p->auth_tag_len    = 10; 
  p->sec_serv        = sec_serv_auth;
  
}


Generated by  Doxygen 1.6.0   Back to index