Lines Matching refs:buffer
59 char buffer[128]; /* NB: always correctly aligned for uint32_t. */ member
97 static void sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_block() argument
98 const uint32_t *words = buffer; in sha256_process_block()
228 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha256_finish_ctx()
231 *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3); in sha256_finish_ctx()
232 *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) | in sha256_finish_ctx()
236 sha256_process_block(ctx->buffer, bytes + pad + 8, ctx); in sha256_finish_ctx()
247 static void sha256_process_bytes(const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_bytes() argument
254 memcpy(&ctx->buffer[left_over], buffer, add); in sha256_process_bytes()
258 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
261 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
264 buffer = (const char *) buffer + add; in sha256_process_bytes()
277 if (UNALIGNED_P (buffer)) in sha256_process_bytes()
279 sha256_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx); in sha256_process_bytes()
280 buffer = (const char *) buffer + 64; in sha256_process_bytes()
283 sha256_process_block(buffer, len & ~63, ctx); in sha256_process_bytes()
284 buffer = (const char *) buffer + (len & ~63); in sha256_process_bytes()
293 memcpy(&ctx->buffer[left_over], buffer, len); in sha256_process_bytes()
296 sha256_process_block(ctx->buffer, 64, ctx); in sha256_process_bytes()
298 memcpy(ctx->buffer, &ctx->buffer[64], 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
502 cp = __php_stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in php_sha256_crypt_r()
548 buffer = NULL; in php_sha256_crypt_r()
571 return buffer; in php_sha256_crypt_r()
583 ZEND_TLS char *buffer; in php_sha256_crypt() local
590 char *new_buffer = (char *) realloc(buffer, needed); in php_sha256_crypt()
595 buffer = new_buffer; in php_sha256_crypt()
599 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()