Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\crypto.c Create Date:2022-07-28 20:23:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fscrypt_generate_iv

Proto:void fscrypt_generate_iv(union fscrypt_iv *iv, u64 lblk_num, const struct fscrypt_info *ci)

Type:void

Parameter:

TypeParameterName
union fscrypt_iv *iv
u64lblk_num
const struct fscrypt_info *ci
76  flags = Return the flags (FSCRYPT_POLICY_FLAG*) of a valid encryption policy
78  memset(iv, 0, ivsize)
80  If flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 Then
81  WARN_ON_ONCE((u32)lblk_num != lblk_num)
82  lblk_num |= Stat data, not accessed from path walking << 32
83  Else if flags & FSCRYPT_POLICY_FLAG_DIRECT_KEY Then
84  memcpy( per-file nonce; only set in DIRECT_KEY mode , This inode's nonce, copied from the fscrypt_context , FS_KEY_DERIVATION_NONCE_SIZE)
86  logical block number within the file = The following macros are to be defined by (lblk_num)
Caller
NameDescribe
fscrypt_crypt_blockEncrypt or decrypt a single filesystem block of file contents
fname_encryptame_encrypt() - encrypt a filename* The output buffer must be at least as large as the input buffer.* Any extra space is filled with NUL padding before encryption.* Return: 0 on success, -errno on failure
fname_decryptame_decrypt() - decrypt a filename* The caller must have allocated sufficient memory for the @oname string.* Return: 0 on success, -errno on failure