Differences From Artifact [86d6230316]:
- File
src/OFCryptoHash.h
— part of check-in
[951f530aee]
at
2016-07-24 00:06:30
on branch trunk
— Rename OFHash to OFCryptoHash
OFHash is too generic, as this protocol is for cryptographic hashes. It
also solves the ambiguity of the +[hash] method (which is now
+[cryptoHash]), which conflicted with -[hash] on the class itself,
resulting in classes conforming to OFHash not being able to be used as a
key in an OFDictionary. (user: js, size: 2252) [annotate] [blame] [check-ins using]
To Artifact [91b722cbde]:
- File
src/OFCryptoHash.h
— part of check-in
[19f7dc67af]
at
2016-07-24 12:14:41
on branch trunk
— -[OFCryptoHash digest]: uint8_t -> unsigned char
While in practice they are usually the same, the C standard says that
only char does not have any alignment requirements. As (u)int*_t is
defined to be an integer type of the specified size, it does not mean
(u)int8_t needs to be char. (user: js, size: 2258) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
63 64 65 66 67 68 69 | * @brief Returns a buffer containing the cryptographic hash. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * * @return A buffer containing the hash */ | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | * @brief Returns a buffer containing the cryptographic hash. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * * @return A buffer containing the hash */ - (const unsigned char*)digest OF_RETURNS_INNER_POINTER; /*! * @brief Resets all state so that a new hash can be calculated. * * @warning This invalidates any pointer previously returned by @ref digest. If * you are still interested in the previous digest, you need to memcpy * it yourself before calling @ref reset! |
︙ | ︙ |