dd5f0f5
diff -rup libsrtp-1.5.0/crypto/hash/hmac.c libsrtp-1.5.0/crypto/hash/hmac.c
dd5f0f5
--- libsrtp-1.5.0/crypto/hash/hmac.c	2014-10-13 10:35:33.000000000 -0400
dd5f0f5
+++ libsrtp-1.5.0/crypto/hash/hmac.c	2014-10-31 09:15:20.666474444 -0400
dd5f0f5
@@ -141,10 +141,10 @@ hmac_init(hmac_ctx_t *state, const uint8
1d54552
   debug_print(mod_hmac, "ipad: %s", octet_string_hex_string(ipad, 64));
1d54552
   
1d54552
   /* initialize sha1 context */
1d54552
-  sha1_init(&state->init_ctx);
1d54552
+  crypto_sha1_init(&state->init_ctx);
1d54552
 
1d54552
   /* hash ipad ^ key */
1d54552
-  sha1_update(&state->init_ctx, ipad, 64);
1d54552
+  crypto_sha1_update(&state->init_ctx, ipad, 64);
1d54552
   memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t)); 
1d54552
 
1d54552
   return err_status_ok;
dd5f0f5
@@ -165,7 +165,7 @@ hmac_update(hmac_ctx_t *state, const uin
1d54552
 	      octet_string_hex_string(message, msg_octets));
1d54552
   
1d54552
   /* hash message into sha1 context */
1d54552
-  sha1_update(&state->ctx, message, msg_octets);
1d54552
+  crypto_sha1_update(&state->ctx, message, msg_octets);
1d54552
 
1d54552
   return err_status_ok;
1d54552
 }
dd5f0f5
@@ -183,7 +183,7 @@ hmac_compute(hmac_ctx_t *state, const vo
1d54552
   
1d54552
   /* hash message, copy output into H */
1d54552
   hmac_update(state, (const uint8_t*)message, msg_octets);
1d54552
-  sha1_final(&state->ctx, H);
1d54552
+  crypto_sha1_final(&state->ctx, H);
1d54552
 
1d54552
   /*
1d54552
    * note that we don't need to debug_print() the input, since the
dd5f0f5
@@ -193,16 +193,16 @@ hmac_compute(hmac_ctx_t *state, const vo
1d54552
 	      octet_string_hex_string((uint8_t *)H, 20));
1d54552
 
1d54552
   /* re-initialize hash context */
1d54552
-  sha1_init(&state->ctx);
1d54552
+  crypto_sha1_init(&state->ctx);
1d54552
   
1d54552
   /* hash opad ^ key  */
1d54552
-  sha1_update(&state->ctx, (uint8_t *)state->opad, 64);
1d54552
+  crypto_sha1_update(&state->ctx, (uint8_t *)state->opad, 64);
1d54552
 
1d54552
   /* hash the result of the inner hash */
1d54552
-  sha1_update(&state->ctx, (uint8_t *)H, 20);
1d54552
+  crypto_sha1_update(&state->ctx, (uint8_t *)H, 20);
1d54552
   
1d54552
   /* the result is returned in the array hash_value[] */
1d54552
-  sha1_final(&state->ctx, hash_value);
1d54552
+  crypto_sha1_final(&state->ctx, hash_value);
1d54552
 
1d54552
   /* copy hash_value to *result */
1d54552
   for (i=0; i < tag_len; i++)    
dd5f0f5
diff -rup libsrtp-1.5.0/crypto/hash/sha1.c libsrtp-1.5.0/crypto/hash/sha1.c
dd5f0f5
--- libsrtp-1.5.0/crypto/hash/sha1.c	2014-10-13 10:35:33.000000000 -0400
dd5f0f5
+++ libsrtp-1.5.0/crypto/hash/sha1.c	2014-10-31 09:15:20.667474449 -0400
dd5f0f5
@@ -77,12 +77,12 @@ uint32_t SHA_K2 = 0x8F1BBCDC;   /* Kt fo
1d54552
 uint32_t SHA_K3 = 0xCA62C1D6;   /* Kt for 60 <= t <= 79 */
1d54552
 
1d54552
 void
1d54552
-sha1(const uint8_t *msg,  int octets_in_msg, uint32_t hash_value[5]) {
1d54552
+crypto_sha1(const uint8_t *msg,  int octets_in_msg, uint32_t hash_value[5]) {
1d54552
   sha1_ctx_t ctx;
1d54552
 
1d54552
-  sha1_init(&ctx;;
1d54552
-  sha1_update(&ctx, msg, octets_in_msg);
1d54552
-  sha1_final(&ctx, hash_value);
1d54552
+  crypto_sha1_init(&ctx;;
1d54552
+  crypto_sha1_update(&ctx, msg, octets_in_msg);
1d54552
+  crypto_sha1_final(&ctx, hash_value);
1d54552
 
1d54552
 }
1d54552
 
dd5f0f5
@@ -99,7 +99,7 @@ sha1(const uint8_t *msg,  int octets_in_
1d54552
  */
1d54552
 
1d54552
 void
1d54552
-sha1_core(const uint32_t M[16], uint32_t hash_value[5]) {
1d54552
+crypto_sha1_core(const uint32_t M[16], uint32_t hash_value[5]) {
1d54552
   uint32_t H0;
1d54552
   uint32_t H1;
1d54552
   uint32_t H2;
dd5f0f5
@@ -186,7 +186,7 @@ sha1_core(const uint32_t M[16], uint32_t
1d54552
 }
1d54552
 
1d54552
 void
1d54552
-sha1_init(sha1_ctx_t *ctx) {
1d54552
+crypto_sha1_init(sha1_ctx_t *ctx) {
1d54552
 
1d54552
   /* initialize state vector */
1d54552
   ctx->H[0] = 0x67452301;
dd5f0f5
@@ -204,7 +204,7 @@ sha1_init(sha1_ctx_t *ctx) {
1d54552
 }
1d54552
 
1d54552
 void
1d54552
-sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
1d54552
+crypto_sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
1d54552
   int i;
1d54552
   uint8_t *buf = (uint8_t *)ctx->M;
1d54552
 
dd5f0f5
@@ -229,7 +229,7 @@ sha1_update(sha1_ctx_t *ctx, const uint8
1d54552
 
1d54552
       debug_print(mod_sha1, "(update) running sha1_core()", NULL);
1d54552
 
1d54552
-      sha1_core(ctx->M, ctx->H);
1d54552
+      crypto_sha1_core(ctx->M, ctx->H);
1d54552
 
1d54552
     } else {
1d54552
 
dd5f0f5
@@ -252,7 +252,7 @@ sha1_update(sha1_ctx_t *ctx, const uint8
1d54552
  */
1d54552
 
1d54552
 void
1d54552
-sha1_final(sha1_ctx_t *ctx, uint32_t *output) {
1d54552
+crypto_sha1_final(sha1_ctx_t *ctx, uint32_t *output) {
1d54552
   uint32_t A, B, C, D, E, TEMP;
1d54552
   uint32_t W[80];  
1d54552
   int i, t;
dd5f0f5
diff -rup libsrtp-1.5.0/crypto/include/sha1.h libsrtp-1.5.0/crypto/include/sha1.h
dd5f0f5
--- libsrtp-1.5.0/crypto/include/sha1.h	2014-10-13 10:35:33.000000000 -0400
dd5f0f5
+++ libsrtp-1.5.0/crypto/include/sha1.h	2014-10-31 09:16:10.367733196 -0400
dd5f0f5
@@ -103,7 +103,7 @@ typedef struct {
1d54552
  */
1d54552
 
1d54552
 void
1d54552
-sha1(const uint8_t *message,  int octets_in_msg, uint32_t output[5]);
1d54552
+crypto_sha1(const uint8_t *message,  int octets_in_msg, uint32_t output[5]);
1d54552
 
1d54552
 /*
1d54552
  * sha1_init(&ctx) initializes the SHA1 context ctx
dd5f0f5
@@ -117,13 +117,13 @@ sha1(const uint8_t *message,  int octets
1d54552
  */
1d54552
 
1d54552
 void
1d54552
-sha1_init(sha1_ctx_t *ctx);
1d54552
+crypto_sha1_init(sha1_ctx_t *ctx);
1d54552
 
1d54552
 void
1d54552
-sha1_update(sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg);
1d54552
+crypto_sha1_update(sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg);
1d54552
 
1d54552
 void
1d54552
-sha1_final(sha1_ctx_t *ctx, uint32_t output[5]);
1d54552
+crypto_sha1_final(sha1_ctx_t *ctx, uint32_t output[5]);
1d54552
 
1d54552
 /*
1d54552
  * The sha1_core function is INTERNAL to SHA-1, but it is declared
dd5f0f5
@@ -141,7 +141,7 @@ sha1_final(sha1_ctx_t *ctx, uint32_t out
1d54552
  */
1d54552
 
1d54552
 void
1d54552
-sha1_core(const uint32_t M[16], uint32_t hash_value[5]);
1d54552
+crypto_sha1_core(const uint32_t M[16], uint32_t hash_value[5]);
dd5f0f5
 
dd5f0f5
 #endif /* else OPENSSL */
1d54552
      
dd5f0f5
diff -rup libsrtp-1.5.0/crypto/test/sha1_driver.c libsrtp-1.5.0/crypto/test/sha1_driver.c
dd5f0f5
--- libsrtp-1.5.0/crypto/test/sha1_driver.c	2014-10-13 10:35:33.000000000 -0400
dd5f0f5
+++ libsrtp-1.5.0/crypto/test/sha1_driver.c	2014-10-31 09:15:20.668474454 -0400
dd5f0f5
@@ -113,9 +113,9 @@ sha1_test_case_validate(const hash_test_
1d54552
   if (test_case->data_len > MAX_HASH_DATA_LEN)
1d54552
     return err_status_bad_param;
1d54552
 
1d54552
-  sha1_init(&ctx;;
1d54552
-  sha1_update(&ctx, test_case->data, test_case->data_len);
1d54552
-  sha1_final(&ctx, hash_value);
1d54552
+  crypto_sha1_init(&ctx;;
1d54552
+  crypto_sha1_update(&ctx, test_case->data, test_case->data_len);
1d54552
+  crypto_sha1_final(&ctx, hash_value);
1d54552
   if (0 == memcmp(test_case->hash, hash_value, 20)) {
1d54552
 #if VERBOSE
1d54552
     printf("PASSED: reference value: %s\n",