Lines Matching refs:buffer
51 char buffer[256]; /* NB: always correctly aligned for uint64_t. */ member
121 sha512_process_block(const void *buffer, size_t len, struct sha512_ctx *ctx) { in sha512_process_block() argument
122 const uint64_t *words = buffer; in sha512_process_block()
253 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha512_finish_ctx()
256 *(uint64_t *) &ctx->buffer[bytes + pad + 8] = SWAP(ctx->total[0] << 3); in sha512_finish_ctx()
257 *(uint64_t *) &ctx->buffer[bytes + pad] = SWAP((ctx->total[1] << 3) | in sha512_finish_ctx()
261 sha512_process_block(ctx->buffer, (size_t)(bytes + pad + 16), ctx); in sha512_finish_ctx()
272 sha512_process_bytes(const void *buffer, size_t len, struct sha512_ctx *ctx) { in sha512_process_bytes() argument
279 memcpy(&ctx->buffer[left_over], buffer, add); in sha512_process_bytes()
283 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
287 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~127], in sha512_process_bytes()
291 buffer = (const char *) buffer + add; in sha512_process_bytes()
305 if (UNALIGNED_P(buffer)) in sha512_process_bytes()
307 sha512_process_block(memcpy(ctx->buffer, buffer, 128), 128, ctx); in sha512_process_bytes()
308 buffer = (const char *) buffer + 128; in sha512_process_bytes()
314 sha512_process_block(buffer, len & ~127, ctx); in sha512_process_bytes()
315 buffer = (const char *) buffer + (len & ~127); in sha512_process_bytes()
324 memcpy(&ctx->buffer[left_over], buffer, len); in sha512_process_bytes()
327 sha512_process_block(ctx->buffer, 128, ctx); in sha512_process_bytes()
329 memcpy(ctx->buffer, &ctx->buffer[128], left_over); in sha512_process_bytes()
358 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { in php_sha512_crypt_r() argument
548 cp = __php_stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in php_sha512_crypt_r()
606 buffer = NULL; in php_sha512_crypt_r()
637 return buffer; in php_sha512_crypt_r()
649 ZEND_TLS char *buffer; in php_sha512_crypt() local
656 char *new_buffer = (char *) realloc(buffer, needed); in php_sha512_crypt()
661 buffer = new_buffer; in php_sha512_crypt()
665 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()