Lines Matching refs:buffer

74 	char buffer[128]; /* NB: always correctly aligned for uint32_t.  */  member
112 static void sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_block() argument
113 const uint32_t *words = buffer; in sha256_process_block()
243 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha256_finish_ctx()
246 *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3); in sha256_finish_ctx()
247 *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) | in sha256_finish_ctx()
251 sha256_process_block(ctx->buffer, bytes + pad + 8, ctx); in sha256_finish_ctx()
262 static void sha256_process_bytes(const void *buffer, size_t len, struct sha256_ctx *ctx) { in sha256_process_bytes() argument
269 memcpy(&ctx->buffer[left_over], buffer, add); in sha256_process_bytes()
273 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
276 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); in sha256_process_bytes()
279 buffer = (const char *) buffer + add; in sha256_process_bytes()
292 if (UNALIGNED_P (buffer)) in sha256_process_bytes()
294 sha256_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx); in sha256_process_bytes()
295 buffer = (const char *) buffer + 64; in sha256_process_bytes()
298 sha256_process_block(buffer, len & ~63, ctx); in sha256_process_bytes()
299 buffer = (const char *) buffer + (len & ~63); in sha256_process_bytes()
308 memcpy(&ctx->buffer[left_over], buffer, len); in sha256_process_bytes()
311 sha256_process_block(ctx->buffer, 64, ctx); in sha256_process_bytes()
313 memcpy(ctx->buffer, &ctx->buffer[64], 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()
570 buffer = NULL; in php_sha256_crypt_r()
594 return buffer; in php_sha256_crypt_r()
606 static char *buffer; in php_sha256_crypt() local
613 char *new_buffer = (char *) realloc(buffer, needed); in php_sha256_crypt()
618 buffer = new_buffer; in php_sha256_crypt()
622 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()