Hi, Jaegeuk,

On 10/24/2016 10:16 AM, Sheng Yong wrote:
> If fscrypt is enabled, we need to convert the encrypted file name before
> printing it. So let's export convert_encrypted_name for other functions,
> and make it returns the length of converted string.
> This patch also changes the parameter of file_is_encrypt to f2fs_inode.
> 
[...]
> -static void convert_encrypted_name(unsigned char *name, int len,
> +int convert_encrypted_name(unsigned char *name, int len,
>                               unsigned char *new, int encrypted)
>  {
>       if (!encrypted) {
>               memcpy(new, name, len);
>               new[len] = 0;
> -             return;
> +             return len;
>       }
>  
>       *new = '_';
> -     digest_encode((const char *)name, 24, (char *)new + 1);
> +     return digest_encode((const char *)name, 24, (char *)new + 1);
I'm confused about the parameter "24" here. Why it is not the length of
the cipher text?

thanks,
Sheng
>  }
[...]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to