Lines Matching refs:buflen

58 	uint32_t buflen;  member
206 ctx->buflen = 0; in sha256_init_ctx()
217 uint32_t bytes = ctx->buflen; in sha256_finish_ctx()
250 if (ctx->buflen != 0) { in sha256_process_bytes()
251 size_t left_over = ctx->buflen; in sha256_process_bytes()
255 ctx->buflen += (uint32_t)add; in sha256_process_bytes()
257 if (ctx->buflen > 64) { in sha256_process_bytes()
258 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
259 ctx->buflen &= 63; in sha256_process_bytes()
261 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
291 size_t left_over = ctx->buflen; in sha256_process_bytes()
300 ctx->buflen = (uint32_t)left_over; in sha256_process_bytes()
325 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) in php_sha256_crypt_r() argument
506 cp = __php_stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in php_sha256_crypt_r()
507 buflen -= sizeof(sha256_salt_prefix) - 1; in php_sha256_crypt_r()
511 int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$", sha256_rounds_prefix, rounds); in php_sha256_crypt_r()
513 int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha256_rounds_prefix, rounds); in php_sha256_crypt_r()
516 buflen -= n; in php_sha256_crypt_r()
519 cp = __php_stpncpy(cp, salt, MIN ((size_t) MAX (0, buflen), salt_len)); in php_sha256_crypt_r()
520 buflen -= MIN(MAX (0, buflen), (int)salt_len); in php_sha256_crypt_r()
522 if (buflen > 0) { in php_sha256_crypt_r()
524 --buflen; in php_sha256_crypt_r()
531 while (n-- > 0 && buflen > 0) \ in php_sha256_crypt_r()
534 --buflen; \ in php_sha256_crypt_r()
550 if (buflen <= 0) { in php_sha256_crypt_r()
588 ZEND_TLS int buflen = 0; in php_sha256_crypt() local
593 if (buflen < needed) { in php_sha256_crypt()
600 buflen = needed; in php_sha256_crypt()
603 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()