Lines Matching refs:buflen
26 uint32_t buflen; member
172 ctx->buflen = 0; in sha256_init_ctx()
184 uint32_t bytes = ctx->buflen; in sha256_finish_ctx()
215 if (ctx->buflen != 0) { in sha256_process_bytes()
216 size_t left_over = ctx->buflen; in sha256_process_bytes()
220 ctx->buflen += add; in sha256_process_bytes()
222 if (ctx->buflen > 64) { in sha256_process_bytes()
223 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
225 ctx->buflen &= 63; in sha256_process_bytes()
228 ctx->buflen); in sha256_process_bytes()
258 size_t left_over = ctx->buflen; in sha256_process_bytes()
267 ctx->buflen = left_over; in sha256_process_bytes()
292 int buflen) in sha256_crypt_r() argument
455 cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in sha256_crypt_r()
456 buflen -= sizeof(sha256_salt_prefix) - 1; in sha256_crypt_r()
459 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", in sha256_crypt_r()
462 buflen -= n; in sha256_crypt_r()
465 cp = stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len)); in sha256_crypt_r()
466 buflen -= MIN((size_t) MAX(0, buflen), salt_len); in sha256_crypt_r()
468 if (buflen > 0) { in sha256_crypt_r()
470 --buflen; in sha256_crypt_r()
476 while (n-- > 0 && buflen > 0) \ in sha256_crypt_r()
479 --buflen; \ in sha256_crypt_r()
495 if (buflen <= 0) { in sha256_crypt_r()
529 static int buflen; in sha256_crypt() local
534 if (buflen < needed) { in sha256_crypt()
540 buflen = needed; in sha256_crypt()
543 return sha256_crypt_r(key, salt, buffer, buflen); in sha256_crypt()