Lines Matching refs:buffer
68 char buffer[256]; /* NB: always correctly aligned for uint64_t. */ member
138 sha512_process_block(const void *buffer, size_t len, struct sha512_ctx *ctx) { in sha512_process_block() argument
139 const uint64_t *words = buffer; in sha512_process_block()
270 memcpy(&ctx->buffer[bytes], fillbuf, pad); in sha512_finish_ctx()
273 *(uint64_t *) &ctx->buffer[bytes + pad + 8] = SWAP(ctx->total[0] << 3); in sha512_finish_ctx()
274 *(uint64_t *) &ctx->buffer[bytes + pad] = SWAP((ctx->total[1] << 3) | in sha512_finish_ctx()
278 sha512_process_block(ctx->buffer, (size_t)(bytes + pad + 16), ctx); in sha512_finish_ctx()
289 sha512_process_bytes(const void *buffer, size_t len, struct sha512_ctx *ctx) { in sha512_process_bytes() argument
296 memcpy(&ctx->buffer[left_over], buffer, add); in sha512_process_bytes()
300 sha512_process_block(ctx->buffer, ctx->buflen & ~127, ctx); in sha512_process_bytes()
304 memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~127], in sha512_process_bytes()
308 buffer = (const char *) buffer + add; in sha512_process_bytes()
322 if (UNALIGNED_P(buffer)) in sha512_process_bytes()
324 sha512_process_block(memcpy(ctx->buffer, buffer, 128), 128, ctx); in sha512_process_bytes()
325 buffer = (const char *) buffer + 128; in sha512_process_bytes()
331 sha512_process_block(buffer, len & ~127, ctx); in sha512_process_bytes()
332 buffer = (const char *) buffer + (len & ~127); in sha512_process_bytes()
341 memcpy(&ctx->buffer[left_over], buffer, len); in sha512_process_bytes()
344 sha512_process_block(ctx->buffer, 128, ctx); in sha512_process_bytes()
346 memcpy(ctx->buffer, &ctx->buffer[128], left_over); in sha512_process_bytes()
375 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { in php_sha512_crypt_r() argument
559 cp = __php_stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in php_sha512_crypt_r()
617 buffer = NULL; in php_sha512_crypt_r()
640 return buffer; in php_sha512_crypt_r()
652 static char *buffer; in php_sha512_crypt() local
659 char *new_buffer = (char *) realloc(buffer, needed); in php_sha512_crypt()
664 buffer = new_buffer; in php_sha512_crypt()
668 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()