Lines Matching defs:data
74 * @data: Pointer to memory containing length at offset
81 int ecryptfs_parse_packet_length(unsigned char *data, size_t *size,
88 if (data[0] < 192) {
90 (*size) = data[0];
92 } else if (data[0] < 224) {
94 (*size) = (data[0] - 192) * 256;
95 (*size) += data[1] + 192;
97 } else if (data[0] == 255) {
203 char *data;
219 data = msg->data;
224 if (data[i++] != ECRYPTFS_TAG_65_PACKET_TYPE) {
229 if (data[i++]) {
231 "[%d]\n", data[i-1]);
235 rc = ecryptfs_parse_packet_length(&data[i], &m_size, &data_len);
255 *cipher_code = data[i++];
266 memcpy(session_key->decrypted_key, &data[i],
269 expected_checksum += (unsigned char)(data[i++]) << 8;
270 expected_checksum += (unsigned char)(data[i++]);
350 char *data;
363 data = msg->data;
371 if (data[i++] != ECRYPTFS_TAG_67_PACKET_TYPE) {
377 if (data[i++]) {
380 "value [%d]\n", __func__, data[i-1]);
384 rc = ecryptfs_parse_packet_length(&data[i], &key_rec->enc_key_size,
406 memcpy(key_rec->enc_key, &data[i], key_rec->enc_key_size);
884 * @data: The memory location containing the start of the tag 70
887 * from @data
895 char *data, size_t max_packet_size)
923 if (data[(*packet_size)++] != ECRYPTFS_TAG_70_PACKET_TYPE) {
926 data[((*packet_size) - 1)], ECRYPTFS_TAG_70_PACKET_TYPE);
930 rc = ecryptfs_parse_packet_length(&data[(*packet_size)],
950 ecryptfs_to_hex(s->fnek_sig_hex, &data[(*packet_size)],
954 s->cipher_code = data[(*packet_size)++];
980 rc = virt_to_scatterlist(&data[(*packet_size)],
1209 * @data: The raw bytes of the packet.
1225 unsigned char *data, struct list_head *auth_tok_list,
1254 if (data[(*packet_size)++] != ECRYPTFS_TAG_1_PACKET_TYPE) {
1271 rc = ecryptfs_parse_packet_length(&data[(*packet_size)], &body_size,
1289 if (unlikely(data[(*packet_size)++] != 0x03)) {
1291 data[(*packet_size) - 1]);
1296 &data[(*packet_size)], ECRYPTFS_SIG_SIZE);
1311 &data[(*packet_size)], (body_size - (ECRYPTFS_SIG_SIZE + 2)));
1341 * @data: The raw bytes of the packet.
1357 unsigned char *data, struct list_head *auth_tok_list,
1389 if (data[(*packet_size)++] != ECRYPTFS_TAG_3_PACKET_TYPE) {
1405 rc = ecryptfs_parse_packet_length(&data[(*packet_size)], &body_size,
1432 if (unlikely(data[(*packet_size)++] != 0x04)) {
1434 data[(*packet_size) - 1]);
1439 (u16)data[(*packet_size)]);
1444 switch(data[(*packet_size)++]) {
1455 if (unlikely(data[(*packet_size)++] != 0x03)) {
1461 switch (data[(*packet_size)++]) {
1465 &data[(*packet_size)], ECRYPTFS_SALT_SIZE);
1469 ((u32) 16 + (data[(*packet_size)] & 15))
1470 << ((data[(*packet_size)] >> 4) + 6);
1476 &data[(*packet_size)],
1488 "[%d]\n", data[(*packet_size) - 1]);
1515 * @data: The raw bytes of the packet
1516 * @contents: This function writes the data contents of the literal
1530 parse_tag_11_packet(unsigned char *data, unsigned char *contents,
1549 * Literal data (arbitrary)
1551 * We need at least 16 bytes of data for the packet to even be
1559 if (data[(*packet_size)++] != ECRYPTFS_TAG_11_PACKET_TYPE) {
1564 rc = ecryptfs_parse_packet_length(&data[(*packet_size)], &body_size,
1583 printk(KERN_ERR "Literal data section in tag 11 packet exceeds "
1588 if (data[(*packet_size)++] != 0x62) {
1593 if (data[(*packet_size)++] != 0x08) {
1599 memcpy(contents, &data[(*packet_size)], (*tag_11_contents_size));
2127 + contents_length); /* Literal data */
2145 dest[(*packet_length)++] = 0x62; /* binary data format specifier */
2391 * @max: The maximum amount of data allowed to be written