Lines Matching refs:buflen

73 	uint32_t buflen;  member
221 ctx->buflen = 0; in sha256_init_ctx()
232 uint32_t bytes = ctx->buflen; in sha256_finish_ctx()
265 if (ctx->buflen != 0) { in sha256_process_bytes()
266 size_t left_over = ctx->buflen; in sha256_process_bytes()
270 ctx->buflen += add; in sha256_process_bytes()
272 if (ctx->buflen > 64) { in sha256_process_bytes()
273 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
274 ctx->buflen &= 63; in sha256_process_bytes()
276 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
306 size_t left_over = ctx->buflen; in sha256_process_bytes()
315 ctx->buflen = left_over; in sha256_process_bytes()
340 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) in php_sha256_crypt_r() argument
524 cp = __php_stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in php_sha256_crypt_r()
525 buflen -= sizeof(sha256_salt_prefix) - 1; in php_sha256_crypt_r()
529 int n = _snprintf(cp, MAX(0, buflen), "%s%u$", sha256_rounds_prefix, rounds); in php_sha256_crypt_r()
531 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha256_rounds_prefix, rounds); in php_sha256_crypt_r()
534 buflen -= n; in php_sha256_crypt_r()
537 cp = __php_stpncpy(cp, salt, MIN ((size_t) MAX (0, buflen), salt_len)); in php_sha256_crypt_r()
538 buflen -= MIN((size_t) MAX (0, buflen), salt_len); in php_sha256_crypt_r()
540 if (buflen > 0) { in php_sha256_crypt_r()
542 --buflen; in php_sha256_crypt_r()
549 while (n-- > 0 && buflen > 0) \ in php_sha256_crypt_r()
552 --buflen; \ in php_sha256_crypt_r()
568 if (buflen <= 0) { in php_sha256_crypt_r()
607 static int buflen; in php_sha256_crypt() local
612 if (buflen < needed) { in php_sha256_crypt()
619 buflen = needed; in php_sha256_crypt()
622 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()