Lines Matching defs:block_size

178 	if (ctx->cipher->block_size != 1 &&
179 ctx->cipher->block_size != 8 &&
180 ctx->cipher->block_size != 16) {
346 const int block_size = ctx->cipher->block_size;
347 const int block_mask = block_size - 1;
353 if ((block_size & block_mask) != 0)
368 if (partial_len < 0 || partial_len >= block_size ||
369 block_size > sizeof(ctx->buf)) {
377 if ((partial_needed = block_size - partial_len) > in_len) {
385 * the number of multiples of block_size of data remaining is
389 if (((in_len - partial_needed) & ~block_mask) > INT_MAX - block_size) {
396 if (!evp_cipher(ctx, out, &len, ctx->buf, block_size))
436 const int block_size = ctx->cipher->block_size;
445 if (partial_len < 0 || partial_len >= block_size ||
446 block_size > sizeof(ctx->buf)) {
450 if (block_size == 1)
461 pad = block_size - partial_len;
464 return evp_cipher(ctx, out, out_len, ctx->buf, block_size);
488 const int block_size = ctx->cipher->block_size;
489 const int block_mask = block_size - 1;
494 if ((block_size & block_mask) != 0)
509 if (block_size > sizeof(ctx->final)) {
518 * Ensure (in_len & ~block_mask) + block_size doesn't overflow.
520 if ((in_len & ~block_mask) > INT_MAX - block_size) {
524 memcpy(out, ctx->final, block_size);
525 out += block_size;
526 total_len = block_size;
535 /* Keep copy of last block if a multiple of block_size was decrypted. */
536 if (block_size > 1 && ctx->partial_len == 0) {
537 if (len < block_size)
539 len -= block_size;
540 memcpy(ctx->final, &out[len], block_size);
564 const int block_size = ctx->cipher->block_size;
581 if (block_size == 1)
589 if (block_size > sizeof(ctx->final)) {
594 pad = ctx->final[block_size - 1];
595 if (pad <= 0 || pad > block_size) {
599 plain_len = block_size - pad;
600 for (i = plain_len; i < block_size; i++) {
915 return ctx->cipher->block_size;
1082 return cipher->block_size;
1108 EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len)
1116 if (block_size != 1 && block_size != 8 && block_size != 16)
1123 cipher->block_size = block_size;