libfcrypto(3)

πŸ’– libfcrypto β€” Library to support encryption formats πŸ’–

okay bestie, sit down, hydrate, because we're reading a man page and it's actually kinda iconic. this is libfcrypto(3) β€” yes, that's section 3 of the Library Functions Manual, the libfcrypto girlies know πŸ’… β€” and it's the library that supports encryption formats. that's it, that's the vibe. πŸ¦‹


✨ SYNOPSIS ✨

so first things first, you gotta pull her in:

#include <libfcrypto.h>

that's the whole gateway, no cap. then we got the support functions ✨

🫢 Support functions

const char *
libfcrypto_get_version(void);

😭 Error functions

because things will go wrong and we must handle it gracefully, periodt:

void
libfcrypto_error_free(libfcrypto_error_t **error);

int
libfcrypto_error_fprint(libfcrypto_error_t *error, FILE *stream);

int
libfcrypto_error_sprint(libfcrypto_error_t *error, char *string,
    size_t size);

int
libfcrypto_error_backtrace_fprint(libfcrypto_error_t *error,
    FILE *stream);

int
libfcrypto_error_backtrace_sprint(libfcrypto_error_t *error,
    char *string, size_t size);

🐑 Blowfish context functions

yes the fish cipher bestie, it's giving underwater main character energy:

int
libfcrypto_blowfish_context_initialize(libfcrypto_blowfish_context_t **context,
    libfcrypto_error_t **error);

int
libfcrypto_blowfish_context_free(libfcrypto_blowfish_context_t **context,
    libfcrypto_error_t **error);

int
libfcrypto_blowfish_context_set_key(libfcrypto_blowfish_context_t *context,
    const uint8_t *key, size_t key_bit_size,
    libfcrypto_error_t **error);

int
libfcrypto_blowfish_crypt_cbc(libfcrypto_blowfish_context_t *context,
    int mode, const uint8_t *initialization_vector,
    size_t initialization_vector_size, const uint8_t *input_data,
    size_t input_data_size, uint8_t *output_data,
    size_t output_data_size, libfcrypto_error_t **error);

int
libfcrypto_blowfish_crypt_ecb(libfcrypto_blowfish_context_t *context,
    int mode, const uint8_t *input_data, size_t input_data_size,
    uint8_t *output_data, size_t output_data_size,
    libfcrypto_error_t **error);

πŸ’œ DESCRIPTION πŸ’œ

okay so this next bit is genuinely wild, no shade to whoever generated these pages. there's a whole chunk of prototypes that got squished into the prose like a text message sent in one giant run-on paragraph 😭. i'm giving them back their breathing room but the words are exactly the same, fr fr:

πŸ” DES3 context functions

DES3 context functions
int libfcrypto_des3_context_initialize(libfcrypto_des3_context_t **context, libfcrypto_error_t **error)
int libfcrypto_des3_context_free(libfcrypto_des3_context_t **context, libfcrypto_error_t **error)
int libfcrypto_des3_context_set_key(libfcrypto_des3_context_t *context, const uint8_t *key, size_t key_bit_size, libfcrypto_error_t **error)
int libfcrypto_des3_crypt_cbc(libfcrypto_des3_context_t *context, int mode, const uint8_t *initialization_vector, size_t initialization_vector_size, const uint8_t *input_data, size_t input_data_size, uint8_t *output_data, size_t output_data_size, libfcrypto_error_t **error)
int libfcrypto_des3_crypt_ecb(libfcrypto_des3_context_t *context, int mode, const uint8_t *input_data, size_t input_data_size, uint8_t *output_data, size_t output_data_size, libfcrypto_error_t **error)

🌊 RC4 context functions

RC4 context functions
int libfcrypto_rc4_context_initialize(libfcrypto_rc4_context_t **context, libfcrypto_error_t **error)
int libfcrypto_rc4_context_free(libfcrypto_rc4_context_t **context, libfcrypto_error_t **error)
int libfcrypto_rc4_context_set_key(libfcrypto_rc4_context_t *context, const uint8_t *key, size_t key_bit_size, libfcrypto_error_t **error)
int libfcrypto_rc4_crypt(libfcrypto_rc4_context_t *context, const uint8_t *input_data, size_t input_data_size, uint8_t *output_data, size_t output_data_size, libfcrypto_error_t **error)

🐍 Serpent context functions

Serpent context functions
int libfcrypto_serpent_context_initialize(libfcrypto_serpent_context_t **context, libfcrypto_error_t **error)
int libfcrypto_serpent_context_free(libfcrypto_serpent_context_t **context, libfcrypto_error_t **error)
int libfcrypto_serpent_context_set_key(libfcrypto_serpent_context_t *context, const uint8_t *key, size_t key_bit_size, libfcrypto_error_t **error)
int libfcrypto_serpent_crypt_cbc(libfcrypto_serpent_context_t *context, int mode, const uint8_t *initialization_vector, size_t initialization_vector_size, const uint8_t *input_data, size_t input_data_size, uint8_t *output_data, size_t output_data_size, libfcrypto_error_t **error)
int libfcrypto_serpent_crypt_ecb(libfcrypto_serpent_context_t *context, int mode, const uint8_t *input_data, size_t input_data_size, uint8_t *output_data, size_t output_data_size, libfcrypto_error_t **error)

🌸 DESCRIPTION (the sequel) 🌸

and now, the actual described function πŸŽ€:

  • libfcrypto_get_version() β€” she's the one you call when you wanna know the library version. that's literally her whole job and she ate. πŸ’…

⭐ RETURN VALUES ⭐

so here's the tea: most of these functions return NULL or -1 on error, and which one you get depends on the return type bestie, they're not all the same. for the actual return values you gotta go look at "libfcrypto.h" yourself. i don't make the rules πŸ™ˆ


🌈 ENVIRONMENT 🌈

None

πŸ“ FILES πŸ“

None

πŸ’€ BUGS πŸ’€

found a bug? of any kind?? please report it on the project issue tracker, the maintainers wanna know, i promise:

https://github.com/libyal/libfcrypto/issues

πŸ‘‘ AUTHOR πŸ‘‘

these man pages are generated from "libfcrypto.h". iconic behaviour honestly.

Copyright (C) 2017-2024, Joachim Metz <joachim.metz@gmail.com>.

this is free software; see the source for copying conditions. and listen to me carefully bestie:

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. nada. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

  • the libfcrypto.h include file

and that's the whole page, you're basically a cryptographer now ✨ stay encrypted, stay slaying πŸ’…

signing off from libfcrypto, section 3 β€” dated January 115, 2024 β€” with all my love, mwah πŸ’œ