ecryptfs_co...ipher_string(9)
π ecryptfs_co...ipher_string(9) π
okay so bestie, we're in the Kernel API Manual today and this one is a tiny little function that does one extremely specific thing and honestly? it ate. it's giving "i have one job and i do it." let's get into it π
β¨ NAME β¨
ecryptfs_code_for_cipher_string β that's the whole name section, no cap. the manpage just drops the function name and dips π (the description got left on read, fr fr).
β¨ SYNOPSIS β¨
u8 ecryptfs_code_for_cipher_string (char *cipher_name , size_t key_bytes
);
so it hands you back a u8 β a whole little byte of an answer β and it wants two things from you: a char *cipher_name and a size_t key_bytes. that's the vibe check. π¦
β¨ ARGUMENTS β¨
cipher_nameβ the string alias for the cipher π like, the cute nickname your cipher goes by.key_bytesβ length of key in bytes; used for AES code selection π₯ so yeah, the key length actually matters here β it's not just decoration, it's how the AES code gets picked. main character parameter energy.
β¨ DESCRIPTION β¨
Returns zero on no match, or the cipher code on match π
that's it. that's the whole function. it looks at your cipher string, and either it's like "nope, zero" or it's like "yes bestie, here's your code β¨." no in-between, no drama. periodt.
lowkey important: zero means no match, not "cipher code zero" β don't get it twisted π
β¨ SEE ALSO β¨
Kernel file ./fs/ecryptfs/crypto.c β that's where the magic lives, go read it iykyk π
and here's the whole friend group, literally the entire guest list:
ecryptfs_from_hex(9)ecryptfs_derive_iv(9)ecryptfs_init_crypt_stat(9)ecryptfs_destroy_crypt_stat(9)virt_to_scatterlist(9)crypt_scatterlist(9)crypt_extent(9)ecryptfs_encrypt_page(9)ecryptfs_decrypt_page(9)ecryptfs_init_crypt_ctx(9)ecryptfs_copy_mount_wide_flags_to_inode_flags(9)ecryptfs_set_default_crypt_stat_vals(9)ecryptfs_new_file_context(9)ecryptfs_validate_marker(9)ecryptfs_process_flags(9)write_ecryptfs_marker(9)ecryptfs_cipher_code_to_string(9)ecryptfs_write_headers_virt(9)ecryptfs_write_metadata(9)set_default_header_data(9)ecryptfs_read_headers_virt(9)ecryptfs_read_xattr_region(9)ecryptfs_process_key_cipher(9)ecryptfs_destroy_crypto(9)ecryptfs_tfm_exists(9)ecryptfs_get_tfm_and_mutex_for_cipher_name(9)ecryptfs_encode_for_filename(9)ecryptfs_decode_from_filename(9)ecryptfs_encrypt_and_encode_filename(9)ecryptfs_decode_and_decrypt_filename(9)
like, that's THIRTY entries, we're not beating the "ecryptfs is a big family" allegations ππ«Ά
and that's the whole page babes π brought to you by the fine folks over at ./fs/ecryptfs, stamped October 2026 β mwah, see you in the next manpage, slay πβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms