Lines Matching refs:buflen

61 	uint64_t buflen;  member
242 ctx->buflen = 0; in sha512_init_ctx()
253 uint64_t bytes = ctx->buflen; in sha512_finish_ctx()
286 if (ctx->buflen != 0) { in sha512_process_bytes()
287 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
291 ctx->buflen += add; in sha512_process_bytes()
293 if (ctx->buflen > 128) { in sha512_process_bytes()
294 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
296 ctx->buflen &= 127; in sha512_process_bytes()
299 (size_t)ctx->buflen); in sha512_process_bytes()
333 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
342 ctx->buflen = left_over; in sha512_process_bytes()
369 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { in php_sha512_crypt_r() argument
553 cp = __php_stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in php_sha512_crypt_r()
554 buflen -= sizeof(sha512_salt_prefix) - 1; in php_sha512_crypt_r()
558 int n = _snprintf(cp, MAX(0, buflen), "%s%u$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
560 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
563 buflen -= n; in php_sha512_crypt_r()
566 cp = __php_stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len)); in php_sha512_crypt_r()
567 buflen -= (int) MIN((size_t) MAX(0, buflen), salt_len); in php_sha512_crypt_r()
569 if (buflen > 0) { in php_sha512_crypt_r()
571 --buflen; in php_sha512_crypt_r()
578 while (n-- > 0 && buflen > 0) \ in php_sha512_crypt_r()
581 --buflen; \ in php_sha512_crypt_r()
609 if (buflen <= 0) { in php_sha512_crypt_r()
647 static int buflen; in php_sha512_crypt() local
652 if (buflen < needed) { in php_sha512_crypt()
659 buflen = needed; in php_sha512_crypt()
662 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()