Lines Matching refs:msgByteCnt
143 int Skein_256_Update(Skein_256_Ctxt_t *ctx, const u08b_t *msg, size_t msgByteCnt) in Skein_256_Update() argument
150 if (msgByteCnt + ctx->h.bCnt > SKEIN_256_BLOCK_BYTES) in Skein_256_Update()
157 Skein_assert(n < msgByteCnt); /* check on our logic here */ in Skein_256_Update()
159 msgByteCnt -= n; in Skein_256_Update()
168 if (msgByteCnt > SKEIN_256_BLOCK_BYTES) in Skein_256_Update()
170 n = (msgByteCnt-1) / SKEIN_256_BLOCK_BYTES; /* number of full blocks to process */ in Skein_256_Update()
172 msgByteCnt -= n * SKEIN_256_BLOCK_BYTES; in Skein_256_Update()
179 if (msgByteCnt) in Skein_256_Update()
181 Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES); in Skein_256_Update()
182 memcpy(&ctx->b[ctx->h.bCnt],msg,msgByteCnt); in Skein_256_Update()
183 ctx->h.bCnt += msgByteCnt; in Skein_256_Update()
341 int Skein_512_Update(Skein_512_Ctxt_t *ctx, const u08b_t *msg, size_t msgByteCnt) in Skein_512_Update() argument
348 if (msgByteCnt + ctx->h.bCnt > SKEIN_512_BLOCK_BYTES) in Skein_512_Update()
355 Skein_assert(n < msgByteCnt); /* check on our logic here */ in Skein_512_Update()
357 msgByteCnt -= n; in Skein_512_Update()
366 if (msgByteCnt > SKEIN_512_BLOCK_BYTES) in Skein_512_Update()
368 n = (msgByteCnt-1) / SKEIN_512_BLOCK_BYTES; /* number of full blocks to process */ in Skein_512_Update()
370 msgByteCnt -= n * SKEIN_512_BLOCK_BYTES; in Skein_512_Update()
377 if (msgByteCnt) in Skein_512_Update()
379 Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES); in Skein_512_Update()
380 memcpy(&ctx->b[ctx->h.bCnt],msg,msgByteCnt); in Skein_512_Update()
381 ctx->h.bCnt += msgByteCnt; in Skein_512_Update()
538 int Skein1024_Update(Skein1024_Ctxt_t *ctx, const u08b_t *msg, size_t msgByteCnt) in Skein1024_Update() argument
545 if (msgByteCnt + ctx->h.bCnt > SKEIN1024_BLOCK_BYTES) in Skein1024_Update()
552 Skein_assert(n < msgByteCnt); /* check on our logic here */ in Skein1024_Update()
554 msgByteCnt -= n; in Skein1024_Update()
563 if (msgByteCnt > SKEIN1024_BLOCK_BYTES) in Skein1024_Update()
565 n = (msgByteCnt-1) / SKEIN1024_BLOCK_BYTES; /* number of full blocks to process */ in Skein1024_Update()
567 msgByteCnt -= n * SKEIN1024_BLOCK_BYTES; in Skein1024_Update()
574 if (msgByteCnt) in Skein1024_Update()
576 Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES); in Skein1024_Update()
577 memcpy(&ctx->b[ctx->h.bCnt],msg,msgByteCnt); in Skein1024_Update()
578 ctx->h.bCnt += msgByteCnt; in Skein1024_Update()