@@ -31,10 +31,19 @@ /*! * A boolean whether the hash has already been calculated. */ @property (readonly, nonatomic, getter=isCalculated) bool calculated; +/*! + * 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. + */ +@property (readonly, nonatomic) const unsigned char *digest + OF_RETURNS_INNER_POINTER; + /*! * @brief Creates a new cryptographic hash. * * @return A new autoreleased OFCryptoHash */ @@ -61,20 +70,10 @@ * @param length The length of the buffer */ - (void)updateWithBuffer: (const void *)buffer length: (size_t)length; -/*! - * @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