Lines Matching refs:buffer

53 	char buffer[128]; /* NB: always correctly aligned for uint32_t.  */  member
91 static void sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_block() argument
92 const uint32_t *words = buffer; in sha256_process_block()
222 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha256_finish_ctx()
225 *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3); in sha256_finish_ctx()
226 *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) | in sha256_finish_ctx()
230 sha256_process_block(ctx->buffer, bytes + pad + 8, ctx); in sha256_finish_ctx()
241 static void sha256_process_bytes(const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_bytes() argument
248 memcpy(&ctx->buffer[left_over], buffer, add); in sha256_process_bytes()
252 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
255 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
258 buffer = (const char *) buffer + add; in sha256_process_bytes()
271 if (UNALIGNED_P (buffer)) in sha256_process_bytes()
273 sha256_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx); in sha256_process_bytes()
274 buffer = (const char *) buffer + 64; in sha256_process_bytes()
277 sha256_process_block(buffer, len & ~63, ctx); in sha256_process_bytes()
278 buffer = (const char *) buffer + (len & ~63); in sha256_process_bytes()
287 memcpy(&ctx->buffer[left_over], buffer, len); in sha256_process_bytes()
290 sha256_process_block(ctx->buffer, 64, ctx); in sha256_process_bytes()
292 memcpy(ctx->buffer, &ctx->buffer[64], left_over); in sha256_process_bytes()
319 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) in php_sha256_crypt_r() argument
509 cp = __php_stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in php_sha256_crypt_r()
555 buffer = NULL; in php_sha256_crypt_r()
586 return buffer; in php_sha256_crypt_r()
598 ZEND_TLS char *buffer; in php_sha256_crypt() local
605 char *new_buffer = (char *) realloc(buffer, needed); in php_sha256_crypt()
610 buffer = new_buffer; in php_sha256_crypt()
614 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()