Lines Matching refs:dest
122 int ecryptfs_write_packet_length(char *dest, size_t size, in ecryptfs_write_packet_length() argument
128 dest[0] = size; in ecryptfs_write_packet_length()
131 dest[0] = (((size - 192) / 256) + 192); in ecryptfs_write_packet_length()
132 dest[1] = ((size - 192) % 256); in ecryptfs_write_packet_length()
618 ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, in ecryptfs_write_tag_70_packet() argument
674 if (!dest) { in ecryptfs_write_tag_70_packet()
704 dest[s->i++] = ECRYPTFS_TAG_70_PACKET_TYPE; in ecryptfs_write_tag_70_packet()
705 rc = ecryptfs_write_packet_length(&dest[s->i], in ecryptfs_write_tag_70_packet()
717 ecryptfs_from_hex(&dest[s->i], in ecryptfs_write_tag_70_packet()
732 dest[s->i++] = s->cipher_code; in ecryptfs_write_tag_70_packet()
800 rc = virt_to_scatterlist(&dest[s->i], s->block_aligned_filename_size, in ecryptfs_write_tag_70_packet()
2018 write_tag_1_packet(char *dest, size_t *remaining_bytes, in write_tag_1_packet() argument
2074 dest[(*packet_size)++] = ECRYPTFS_TAG_1_PACKET_TYPE; in write_tag_1_packet()
2075 rc = ecryptfs_write_packet_length(&dest[(*packet_size)], in write_tag_1_packet()
2084 dest[(*packet_size)++] = 0x03; /* version 3 */ in write_tag_1_packet()
2085 memcpy(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); in write_tag_1_packet()
2087 dest[(*packet_size)++] = RFC2440_CIPHER_RSA; in write_tag_1_packet()
2088 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_1_packet()
2110 write_tag_11_packet(char *dest, size_t *remaining_bytes, char *contents, in write_tag_11_packet() argument
2134 dest[(*packet_length)++] = ECRYPTFS_TAG_11_PACKET_TYPE; in write_tag_11_packet()
2135 rc = ecryptfs_write_packet_length(&dest[(*packet_length)], in write_tag_11_packet()
2144 dest[(*packet_length)++] = 0x62; /* binary data format specifier */ in write_tag_11_packet()
2145 dest[(*packet_length)++] = 8; in write_tag_11_packet()
2146 memcpy(&dest[(*packet_length)], "_CONSOLE", 8); in write_tag_11_packet()
2148 memset(&dest[(*packet_length)], 0x00, 4); in write_tag_11_packet()
2150 memcpy(&dest[(*packet_length)], contents, contents_length); in write_tag_11_packet()
2173 write_tag_3_packet(char *dest, size_t *remaining_bytes, in write_tag_3_packet() argument
2339 dest[(*packet_size)++] = ECRYPTFS_TAG_3_PACKET_TYPE; in write_tag_3_packet()
2342 rc = ecryptfs_write_packet_length(&dest[(*packet_size)], in write_tag_3_packet()
2351 dest[(*packet_size)++] = 0x04; /* version 4 */ in write_tag_3_packet()
2362 dest[(*packet_size)++] = cipher_code; in write_tag_3_packet()
2363 dest[(*packet_size)++] = 0x03; /* S2K */ in write_tag_3_packet()
2364 dest[(*packet_size)++] = 0x01; /* MD5 (TODO: parameterize) */ in write_tag_3_packet()
2365 memcpy(&dest[(*packet_size)], auth_tok->token.password.salt, in write_tag_3_packet()
2368 dest[(*packet_size)++] = 0x60; /* hash iterations (65536) */ in write_tag_3_packet()
2369 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_3_packet()