Lines Matching full:remainder
48 size_t remainder = length; in ccm_mode_encrypt_contiguous_blocks() local
80 if (need > remainder) in ccm_mode_encrypt_contiguous_blocks()
153 remainder = (size_t)&data[length] - (size_t)datap; in ccm_mode_encrypt_contiguous_blocks()
156 if (remainder > 0 && remainder < block_size) { in ccm_mode_encrypt_contiguous_blocks()
157 memcpy(ctx->ccm_remainder, datap, remainder); in ccm_mode_encrypt_contiguous_blocks()
158 ctx->ccm_remainder_len = remainder; in ccm_mode_encrypt_contiguous_blocks()
164 } while (remainder > 0); in ccm_mode_encrypt_contiguous_blocks()
229 /* copy remainder to temporary buffer */ in ccm_encrypt_final()
351 size_t remainder = length; in ccm_mode_decrypt_contiguous_blocks() local
440 if (need > remainder) in ccm_mode_decrypt_contiguous_blocks()
490 remainder = (size_t)&data[length] - (size_t)datap; in ccm_mode_decrypt_contiguous_blocks()
493 if (remainder > 0 && remainder < block_size) { in ccm_mode_decrypt_contiguous_blocks()
494 memcpy(ctx->ccm_remainder, datap, remainder); in ccm_mode_decrypt_contiguous_blocks()
495 ctx->ccm_remainder_len = remainder; in ccm_mode_decrypt_contiguous_blocks()
504 ctx->ccm_processed_data_len += remainder; in ccm_mode_decrypt_contiguous_blocks()
511 } while (remainder > 0); in ccm_mode_decrypt_contiguous_blocks()
765 size_t remainder, processed; in ccm_init() local
797 remainder = auth_data_len; in ccm_init()
812 remainder -= processed; in ccm_init()
813 if (remainder == 0) { in ccm_init()
819 if (remainder < block_size) { in ccm_init()
825 memcpy(authp, &(auth_data[processed]), remainder); in ccm_init()
827 remainder = 0; in ccm_init()
831 remainder -= block_size; in ccm_init()
837 } while (remainder > 0); in ccm_init()