Lines Matching refs:buflen

52 	uint64_t buflen;  member
233 ctx->buflen = 0; in sha512_init_ctx()
244 uint64_t bytes = ctx->buflen; in sha512_finish_ctx()
277 if (ctx->buflen != 0) { in sha512_process_bytes()
278 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
282 ctx->buflen += add; in sha512_process_bytes()
284 if (ctx->buflen > 128) { in sha512_process_bytes()
285 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
287 ctx->buflen &= 127; in sha512_process_bytes()
290 (size_t)ctx->buflen); in sha512_process_bytes()
324 size_t left_over = (size_t)ctx->buflen; in sha512_process_bytes()
333 ctx->buflen = left_over; in sha512_process_bytes()
360 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { in php_sha512_crypt_r() argument
541 cp = __php_stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in php_sha512_crypt_r()
542 buflen -= sizeof(sha512_salt_prefix) - 1; in php_sha512_crypt_r()
546 int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
548 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha512_rounds_prefix, rounds); in php_sha512_crypt_r()
551 buflen -= n; in php_sha512_crypt_r()
554 cp = __php_stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len)); in php_sha512_crypt_r()
555 buflen -= (int) MIN((size_t) MAX(0, buflen), salt_len); in php_sha512_crypt_r()
557 if (buflen > 0) { in php_sha512_crypt_r()
559 --buflen; in php_sha512_crypt_r()
566 while (n-- > 0 && buflen > 0) \ in php_sha512_crypt_r()
569 --buflen; \ in php_sha512_crypt_r()
597 if (buflen <= 0) { in php_sha512_crypt_r()
635 ZEND_TLS int buflen = 0; in php_sha512_crypt() local
640 if (buflen < needed) { in php_sha512_crypt()
647 buflen = needed; in php_sha512_crypt()
650 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()