Changeset 2809 for pjproject/branches/1.0/pjlib-util/src/pjlib-util/sha1.c
- Timestamp:
- Jun 25, 2009 12:46:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.0/pjlib-util/src/pjlib-util/sha1.c
r1001 r2809 106 106 107 107 108 static void SHA1_Transform(pj_uint32_t state[5], constpj_uint8_t buffer[64]);108 static void SHA1_Transform(pj_uint32_t state[5], pj_uint8_t buffer[64]); 109 109 110 110 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) … … 132 132 133 133 /* Hash a single 512-bit block. This is the core of the algorithm. */ 134 static void SHA1_Transform(pj_uint32_t state[5], constpj_uint8_t buffer[64])134 static void SHA1_Transform(pj_uint32_t state[5], pj_uint8_t buffer[64]) 135 135 { 136 136 pj_uint32_t a, b, c, d, e; … … 216 216 SHA1_Transform(context->state, context->buffer); 217 217 for ( ; i + 63 < len; i += 64) { 218 SHA1_Transform(context->state, data + i); 218 pj_uint8_t tmp[64]; 219 pj_memcpy(tmp, data + i, 64); 220 SHA1_Transform(context->state, tmp); 219 221 } 220 222 j = 0;
Note: See TracChangeset
for help on using the changeset viewer.