Differences From Artifact [618167fc85]:
- File
src/OFHMAC.h
— part of check-in
[82801897d3]
at
2022-03-25 10:22:55
on branch trunk
— OFCryptographicHash: Add -[calculate]
Before, -[digest] would do the final calculation, however, this would
mean a property modifies state, which is bad. (user: js, size: 3932) [annotate] [blame] [check-ins using] [more...]
To Artifact [2d8e8879fb]:
- File src/OFHMAC.h — part of check-in [7ab0c2561a] at 2022-09-25 15:39:40 on branch trunk — Document more exceptions (user: js, size: 4173) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | @property (readonly, nonatomic) bool allowsSwappableMemory; /** * @brief A buffer containing the HMAC. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. */ @property (readonly, nonatomic) const unsigned char *digest OF_RETURNS_INNER_POINTER; /** * @brief The size of the digest. */ | > > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | @property (readonly, nonatomic) bool allowsSwappableMemory; /** * @brief A buffer containing the HMAC. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * * @throw OFHashNotCalculatedException The HMAC hasn't been calculated yet */ @property (readonly, nonatomic) const unsigned char *digest OF_RETURNS_INNER_POINTER; /** * @brief The size of the digest. */ |
︙ | ︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - (void)setKey: (const void *)key length: (size_t)length; /** * @brief Adds a buffer to the HMAC to be calculated. * * @param buffer The buffer which should be included into the calculation * @param length The length of the buffer */ - (void)updateWithBuffer: (const void *)buffer length: (size_t)length; /** * @brief Performs the final calculation of the HMAC. */ - (void)calculate; /** * @brief Resets the HMAC so that it can be calculated for a new message. * * @note This does not reset the key so that a new HMAC with the same key can | > > > | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - (void)setKey: (const void *)key length: (size_t)length; /** * @brief Adds a buffer to the HMAC to be calculated. * * @param buffer The buffer which should be included into the calculation * @param length The length of the buffer * @throw OFHashAlreadyCalculatedException The HMAC has already been calculated */ - (void)updateWithBuffer: (const void *)buffer length: (size_t)length; /** * @brief Performs the final calculation of the HMAC. * * @throw OFHashAlreadyCalculatedException The HMAC has already been calculated */ - (void)calculate; /** * @brief Resets the HMAC so that it can be calculated for a new message. * * @note This does not reset the key so that a new HMAC with the same key can |
︙ | ︙ |