Lines Matching refs:buflen

67 	uint64_t buflen;  member
248 ctx->buflen = 0; in sha512_init_ctx()
259 uint64_t bytes = ctx->buflen; in sha512_finish_ctx()
292 if (ctx->buflen != 0) { in sha512_process_bytes()
293 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
297 ctx->buflen += add; in sha512_process_bytes()
299 if (ctx->buflen > 128) { in sha512_process_bytes()
300 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
302 ctx->buflen &= 127; in sha512_process_bytes()
305 (size_t)ctx->buflen); in sha512_process_bytes()
339 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
348 ctx->buflen = left_over; in sha512_process_bytes()
375 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { in php_sha512_crypt_r() argument
559 cp = __php_stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in php_sha512_crypt_r()
560 buflen -= sizeof(sha512_salt_prefix) - 1; in php_sha512_crypt_r()
564 int n = _snprintf(cp, MAX(0, buflen), "%s%u$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
566 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
569 buflen -= n; in php_sha512_crypt_r()
572 cp = __php_stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len)); in php_sha512_crypt_r()
573 buflen -= (int) MIN((size_t) MAX(0, buflen), salt_len); in php_sha512_crypt_r()
575 if (buflen > 0) { in php_sha512_crypt_r()
577 --buflen; in php_sha512_crypt_r()
584 while (n-- > 0 && buflen > 0) \ in php_sha512_crypt_r()
587 --buflen; \ in php_sha512_crypt_r()
615 if (buflen <= 0) { in php_sha512_crypt_r()
653 static int buflen; in php_sha512_crypt() local
658 if (buflen < needed) { in php_sha512_crypt()
665 buflen = needed; in php_sha512_crypt()
668 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()