Lines Matching defs:ctx
51 MD5Init(MD5_CTX *ctx)
53 ctx->count = 0;
54 ctx->state[0] = 0x67452301;
55 ctx->state[1] = 0xefcdab89;
56 ctx->state[2] = 0x98badcfe;
57 ctx->state[3] = 0x10325476;
66 MD5Update(MD5_CTX *ctx, const unsigned char *input, size_t len)
71 have = (size_t)((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
75 ctx->count += (u_int64_t)len << 3;
79 memcpy(ctx->buffer + have, input, need);
80 MD5Transform(ctx->state, ctx->buffer);
88 MD5Transform(ctx->state, input);
96 memcpy(ctx->buffer + have, input, len);
105 MD5Pad(MD5_CTX *ctx)
111 PUT_64BIT_LE(count, ctx->count);
115 ((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
118 MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
119 MD5Update(ctx, count, 8);
124 * Final wrapup--call MD5Pad, fill in digest and zero out ctx.
127 MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
131 MD5Pad(ctx);
133 PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
134 explicit_bzero(ctx, sizeof(*ctx));