Index: src/OFHTTPResponse.h ================================================================== --- src/OFHTTPResponse.h +++ src/OFHTTPResponse.h @@ -72,11 +72,17 @@ @end #ifdef __cplusplus extern "C" { #endif +/*! + * @brief Returns a description string for the specified HTTP status code. + * + * @param code The HTTP status code to return a description string for + * @return A description string for the specified HTTP status code + */ extern OFString *_Nonnull of_http_status_code_to_string(short code); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END Index: src/pbkdf2.h ================================================================== --- src/pbkdf2.h +++ src/pbkdf2.h @@ -32,25 +32,24 @@ #ifdef __cplusplus extern "C" { #endif /*! - * @brief Derive a key from a password and a salt. + * @brief Derives a key from a password and a salt using PBKDF2. * - * @note This will call @ref OFHMAC::reset on the @ref OFHMAC first, making it - * possible to reuse the @ref OFHMAC, but also meaning all previous - * results from the @ref OFHMAC get invalidated if they have not been - * copied. + * @note This will call @ref OFHMAC::reset on the `HMAC` first, making it + * possible to reuse the `HMAC`, but also meaning all previous results + * from the `HMAC` get invalidated if they have not been copied. * * @param HMAC The HMAC to use to derive a key * @param iterations The number of iterations to perform * @param salt The salt to derive a key with * @param saltLength The length of the salt * @param password The password to derive a key from * @param passwordLength The length of the password * @param key The buffer to write the key to - * @param keyLength The desired length for the derived key (key needs to have + * @param keyLength The desired length for the derived key (`key` needs to have * enough storage) * @param allowsSwappableMemory Whether data may be stored in swappable memory */ extern void of_pbkdf2(OFHMAC *HMAC, size_t iterations, const unsigned char *salt, size_t saltLength, Index: src/scrypt.h ================================================================== --- src/scrypt.h +++ src/scrypt.h @@ -36,14 +36,30 @@ extern void of_salsa20_8_core(uint32_t buffer[_Nonnull 16]); extern void of_scrypt_block_mix(uint32_t *output, const uint32_t *input, size_t blockSize); extern void of_scrypt_romix(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp); + +/*! + * @brief Derives a key from a password and a salt using scrypt. + * + * @param blockSize The block size to use + * @param costFactor The CPU/memory cost factor to use + * @param parallelization The parallelization to use + * @param salt The salt to derive a key with + * @param saltLength The length of the salt + * @param password The password to derive a key from + * @param passwordLength The length of the password + * @param key The buffer to write the key to + * @param keyLength The desired length for the derived key (`key` needs to have + * enough storage) + * @param allowsSwappableMemory Whether data may be stored in swappable memory + */ extern void of_scrypt(size_t blockSize, size_t costFactor, size_t parallelization, const unsigned char *salt, size_t saltLength, const char *password, size_t passwordLength, unsigned char *key, size_t keyLength, bool allowsSwappableMemory); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END