Differences From Artifact [eef5fddc43]:
- File src/pbkdf2.h — part of check-in [374e1a1bfa] at 2021-01-02 22:04:26 on branch trunk — Update copyright (user: js, size: 2041) [annotate] [blame] [check-ins using] [more...]
To Artifact [c5d81514ad]:
- File
src/OFPBKDF2.h
— part of check-in
[3c88df0ce4]
at
2021-05-09 14:45:19
on branch amiga-library
— Merge trunk into branch "amiga-library"
All necessary changes to adjust for the changes made in trunk are
included in the merge commit. (user: js, size: 2018) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
25 26 27 28 29 30 31 | OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFHMAC; /** | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFHMAC; /** * @brief The parameters for @ref OFPBKDF2. */ typedef struct { /** @brief The HMAC to use to derive a key. */ __unsafe_unretained OFHMAC *HMAC; /** @brief The number of iterations to perform. */ size_t iterations; /** @brief The salt to derive a key with. */ const unsigned char *salt; /** @brief The length of the salt. */ |
︙ | ︙ | |||
50 51 52 53 54 55 56 | * @brief The desired length for the derived key. * * @ref key needs to have enough storage. */ size_t keyLength; /** @brief Whether data may be stored in swappable memory. */ bool allowsSwappableMemory; | | | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | * @brief The desired length for the derived key. * * @ref key needs to have enough storage. */ size_t keyLength; /** @brief Whether data may be stored in swappable memory. */ bool allowsSwappableMemory; } OFPBKDF2Parameters; #ifdef __cplusplus extern "C" { #endif /** * @brief Derives a key from a password and a salt using PBKDF2. * * @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 parameters The parameters to use */ extern void OFPBKDF2(OFPBKDF2Parameters parameters); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |