Changeset 582 for pjproject/trunk/pjlib-util/src/pjlib-util/md5.c
- Timestamp:
- Jul 3, 2006 3:19:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/md5.c
r65 r582 152 152 if (count < 8) { 153 153 /* Two lots of padding: Pad the first block to 64 bytes */ 154 pj_ memset(p, 0, count);154 pj_bzero(p, count); 155 155 byteReverse(ctx->in, 16); 156 156 MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in); 157 157 158 158 /* Now fill the next block with 56 bytes */ 159 pj_ memset(ctx->in, 0, 56);159 pj_bzero(ctx->in, 56); 160 160 } else { 161 161 /* Pad block to 56 bytes */ 162 pj_ memset(p, 0, count - 8);162 pj_bzero(p, count - 8); 163 163 } 164 164 byteReverse(ctx->in, 14); … … 171 171 byteReverse((unsigned char *) ctx->buf, 4); 172 172 pj_memcpy(digest, ctx->buf, 16); 173 pj_ memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */173 pj_bzero(ctx, sizeof(ctx)); /* In case it's sensitive */ 174 174 } 175 175
Note: See TracChangeset
for help on using the changeset viewer.