Lines Matching refs:input_length
14 size_t input_length, output_length; in base64_encode() local
17 PetscCall(PetscStrlen((const char *)data, &input_length)); in base64_encode()
18 output_length = 4 * ((input_length + 2) / 3); in base64_encode()
21 for (i = 0, j = 0; i < input_length;) { in base64_encode()
22 uint32_t octet_a = i < input_length ? (unsigned char)data[i++] : 0; in base64_encode()
23 uint32_t octet_b = i < input_length ? (unsigned char)data[i++] : 0; in base64_encode()
24 uint32_t octet_c = i < input_length ? (unsigned char)data[i++] : 0; in base64_encode()
33 for (i = 0; i < mod_table[input_length % 3]; i++) encoded_data[output_length - 1 - i] = '='; in base64_encode()
42 size_t input_length, output_length; in base64_decode() local
50 PetscCall(PetscStrlen((const char *)data, &input_length)); in base64_decode()
51 …PetscCheck(input_length % 4 == 0, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Input length must be divi… in base64_decode()
53 output_length = input_length / 4 * 3; in base64_decode()
54 if (data[input_length - 1] == '=') (output_length)--; in base64_decode()
55 if (data[input_length - 2] == '=') (output_length)--; in base64_decode()
58 for (i = 0, j = 0; i < input_length;) { in base64_decode()