Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ase64_encode() -* Encodes the input string using characters from the set [A-Za-z0-9+,].* The encoded string is roughly 4/3 times the size of the input string.* Return: length of the encoded string

Proto:static int base64_encode(const u8 *src, int len, char *dst)

Type:int

Parameter:

TypeParameterName
const u8 *src
intlen
char *dst
141  bits = 0 , ac = 0
142  cp = dst
144  When i < len cycle
145  ac += src[i] << bits
146  bits += 8
147  Do
148  cp++ = lookup_table[ac & 0x3f]
149  ac >>= 6
150  bits -= 6
151  When bits >= 6 cycle
153  If bits Then cp++ = lookup_table[ac & 0x3f]
155  Return cp - dst
Caller
NameDescribe
fscrypt_fname_disk_to_usrscrypt_fname_disk_to_usr() - converts a filename from disk space to user* space* The caller must have allocated sufficient memory for the @oname string.* If the key is available, we'll decrypt the disk name; otherwise, we'll encode* it for presentation