Lines Matching refs:buffer

58 	char buffer[128]; /* NB: always correctly aligned for uint32_t.  */  member
96 static void sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_block() argument
97 const uint32_t *words = buffer; in sha256_process_block()
227 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha256_finish_ctx()
230 *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3); in sha256_finish_ctx()
231 *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) | in sha256_finish_ctx()
235 sha256_process_block(ctx->buffer, bytes + pad + 8, ctx); in sha256_finish_ctx()
246 static void sha256_process_bytes(const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_bytes() argument
253 memcpy(&ctx->buffer[left_over], buffer, add); in sha256_process_bytes()
257 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
260 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
263 buffer = (const char *) buffer + add; in sha256_process_bytes()
276 if (UNALIGNED_P (buffer)) in sha256_process_bytes()
278 sha256_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx); in sha256_process_bytes()
279 buffer = (const char *) buffer + 64; in sha256_process_bytes()
282 sha256_process_block(buffer, len & ~63, ctx); in sha256_process_bytes()
283 buffer = (const char *) buffer + (len & ~63); in sha256_process_bytes()
292 memcpy(&ctx->buffer[left_over], buffer, len); in sha256_process_bytes()
295 sha256_process_block(ctx->buffer, 64, ctx); in sha256_process_bytes()
297 memcpy(ctx->buffer, &ctx->buffer[64], left_over); in sha256_process_bytes()
324 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) in php_sha256_crypt_r() argument
514 cp = __php_stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in php_sha256_crypt_r()
560 buffer = NULL; in php_sha256_crypt_r()
591 return buffer; in php_sha256_crypt_r()
603 ZEND_TLS char *buffer; in php_sha256_crypt() local
610 char *new_buffer = (char *) realloc(buffer, needed); in php_sha256_crypt()
615 buffer = new_buffer; in php_sha256_crypt()
619 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()