staticint ubifs_crypt_set_context(struct inode *inode, constvoid *ctx,
size_t len, void *fs_data)
{ /* * Creating an encryption context is done unlocked since we * operate on a new inode which is not visible to other users * at this point. So, no need to check whether inode is locked.
*/ return ubifs_xattr_set(inode, UBIFS_XATTR_NAME_ENCRYPTION_CONTEXT,
ctx, len, 0, false);
}
/** * ubifs_encrypt - Encrypt data. * @inode: inode which refers to the data node * @dn: data node to encrypt * @in_len: length of data to be compressed * @out_len: allocated memory size for the data area of @dn * @block: logical block number of the block * * This function encrypt a possibly-compressed data in the data node. * The encrypted data length will store in @out_len.
*/ int ubifs_encrypt(conststruct inode *inode, struct ubifs_data_node *dn, unsignedint in_len, unsignedint *out_len, int block)
{ struct ubifs_info *c = inode->i_sb->s_fs_info; void *p = &dn->data; unsignedint pad_len = round_up(in_len, UBIFS_CIPHER_BLOCK_SIZE); int err;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.