Lines Matching refs:buf
133 void sha1_init_raw(__u32 *buf) in sha1_init_raw() argument
135 buf[0] = 0x67452301; in sha1_init_raw()
136 buf[1] = 0xefcdab89; in sha1_init_raw()
137 buf[2] = 0x98badcfe; in sha1_init_raw()
138 buf[3] = 0x10325476; in sha1_init_raw()
139 buf[4] = 0xc3d2e1f0; in sha1_init_raw()
181 memcpy(&ctx->buf[partial], data, l); in sha1_update()
185 sha1_blocks(&ctx->state, ctx->buf, 1); in sha1_update()
198 memcpy(&ctx->buf[partial], data, len); in sha1_update()
207 ctx->buf[partial++] = 0x80; in __sha1_final()
209 memset(&ctx->buf[partial], 0, SHA1_BLOCK_SIZE - partial); in __sha1_final()
210 sha1_blocks(&ctx->state, ctx->buf, 1); in __sha1_final()
213 memset(&ctx->buf[partial], 0, SHA1_BLOCK_SIZE - 8 - partial); in __sha1_final()
214 *(__be64 *)&ctx->buf[SHA1_BLOCK_SIZE - 8] = cpu_to_be64(bitcount); in __sha1_final()
215 sha1_blocks(&ctx->state, ctx->buf, 1); in __sha1_final()
294 __sha1_final(&ctx->sha_ctx, ctx->sha_ctx.buf); in hmac_sha1_final()
295 memset(&ctx->sha_ctx.buf[SHA1_DIGEST_SIZE], 0, in hmac_sha1_final()
297 ctx->sha_ctx.buf[SHA1_DIGEST_SIZE] = 0x80; in hmac_sha1_final()
298 *(__be32 *)&ctx->sha_ctx.buf[SHA1_BLOCK_SIZE - 4] = in hmac_sha1_final()
302 sha1_blocks(&ctx->ostate, ctx->sha_ctx.buf, 1); in hmac_sha1_final()