hcrypto_misc(3)

πŸ“¦
version 7.8.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

✨ NAME ✨

hcrypto_misc β€” the hcrypto miscellaneous functions, aka the little grab-bag of crypto goodies that didn't fit anywhere else πŸ’–


🌸 SYNOPSIS 🌸

Functions

int PKCS5_PBKDF2_HMAC (const void *password, size_t password_len,
    const void *salt, size_t salt_len, unsigned long iter,
    const EVP_MD *md, size_t keylen, void *key)
int PKCS5_PBKDF2_HMAC_SHA1 (const void *password, size_t password_len,
    const void *salt, size_t salt_len, unsigned long iter,
    size_t keylen, void *key)

πŸ’… Detailed Description πŸ’…

okay so bestie, this page is the home of the key-derivation girlies. two functions, both doing the PKCS5 thing: you hand over a password, a salt and an iteration counter, and it hands you back a shiny crypto key. no cap, that's the whole vibe. πŸ‘‘


πŸ‘‘ Function Documentation πŸ‘‘

int PKCS5_PBKDF2_HMAC (const void * password, size_t password_len, const void * salt, size_t salt_len, unsigned long iter, const EVP_MD * md, size_t keylen, void * key)

literally exactly what PKCS5 says on the tin: take a password, a salt and an iteration counter, and turn them into a crypto key. the digest function is yours to pick here, which is the main character energy move of this one. ✨

Parameters

  • password β€” the password. πŸ“
  • password_len β€” how long that password is.
  • salt β€” the salt. (yes, just salt. iconic.)
  • salt_len β€” how long the salt is.
  • iter β€” the iteration counter.
  • md β€” the digest function.
  • keylen β€” the output key length.
  • key β€” the output key itself. the glow-up destination πŸ’–

Returns

1 on success, anything that isn't 1 on failure. simple as that, fr fr.


int PKCS5_PBKDF2_HMAC_SHA1 (const void * password, size_t password_len, const void * salt, size_t salt_len, unsigned long iter, size_t keylen, void * key)

same energy, same deal: per PKCS5, it converts a password, a salt and an iteration counter into a crypto key. the difference? this one already knows the digest β€” it's the SHA1 flavor, so there's no md to pass in. lowkey convenient πŸŽ€

Parameters

  • password β€” the password. πŸ¦‹
  • password_len β€” length of the password.
  • salt β€” salt.
  • salt_len β€” length of the salt.
  • iter β€” iteration counter.
  • keylen β€” the output key length.
  • key β€” the output key. 🫢

Returns

1 on success, non-1 on failure. periodt.


🧚 Author 🧚

this one was generated automatically by Doxygen for the Heimdal crypto library, straight from the source code. not me having a ghostwriter 😭


Version 7.8.0, dated Tue Nov 15 2022 β€” that's the whole footer, bestie, and this page is officially wrapped πŸ’œ bye!!
πŸ“¦ where this page comes from