Lines Matching refs:buflen
26 uint64_t buflen; member
203 ctx->buflen = 0; in sha512_init_ctx()
215 uint64_t bytes = ctx->buflen; in sha512_finish_ctx()
246 if (ctx->buflen != 0) { in sha512_process_bytes()
247 size_t left_over = ctx->buflen; in sha512_process_bytes()
251 ctx->buflen += add; in sha512_process_bytes()
253 if (ctx->buflen > 128) { in sha512_process_bytes()
254 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
256 ctx->buflen &= 127; in sha512_process_bytes()
259 ctx->buflen); in sha512_process_bytes()
293 size_t left_over = ctx->buflen; in sha512_process_bytes()
302 ctx->buflen = left_over; in sha512_process_bytes()
327 int buflen) in sha512_crypt_r() argument
490 cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in sha512_crypt_r()
491 buflen -= sizeof(sha512_salt_prefix) - 1; in sha512_crypt_r()
494 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", in sha512_crypt_r()
497 buflen -= n; in sha512_crypt_r()
500 cp = stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len)); in sha512_crypt_r()
501 buflen -= MIN((size_t) MAX(0, buflen), salt_len); in sha512_crypt_r()
503 if (buflen > 0) { in sha512_crypt_r()
505 --buflen; in sha512_crypt_r()
511 while (n-- > 0 && buflen > 0) \ in sha512_crypt_r()
514 --buflen; \ in sha512_crypt_r()
542 if (buflen <= 0) { in sha512_crypt_r()
576 static int buflen; in sha512_crypt() local
581 if (buflen < needed) { in sha512_crypt()
587 buflen = needed; in sha512_crypt()
590 return sha512_crypt_r(key, salt, buffer, buflen); in sha512_crypt()