ObjFW  Diff

Differences From Artifact [90cfc63c8c]:

  • File src/OFHash.h — part of check-in [67917b918a] at 2010-06-12 20:47:29 on branch trunk — Move a few classes and categories so they have their own files. (user: js size: 1017)

To Artifact [11414f28b0]:

  • File src/OFHash.h — part of check-in [b6a39dd3d1] at 2010-10-24 13:15:01 on branch trunk — Rename a few methods returning BOOL. (user: js size: 1023)

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import "OFObject.h"

/**
 * \brief A base class for classes providing hash functions.
 */
@interface OFHash: OFObject
{
	BOOL	 calculated;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) BOOL calculated;
#endif

/**
 * Adds a buffer to the hash to be calculated.
 *
 * \param buf The buffer which should be included into the calculation.
 * \param size The size of the buffer
 */
- (void)updateWithBuffer: (const char*)buf
		  ofSize: (size_t)size;

/**
 * \return A buffer containing the hash. The size of the buffer is depending
 *	   on the hash used. The buffer is part of object's memory pool.
 */
- (uint8_t*)digest;

/**
 * \return A boolean whether the hash has already been calculated
 */
- (BOOL)calculated;
@end







|



|




















|

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import "OFObject.h"

/**
 * \brief A base class for classes providing hash functions.
 */
@interface OFHash: OFObject
{
	BOOL	 isCalculated;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) BOOL isCalculated;
#endif

/**
 * Adds a buffer to the hash to be calculated.
 *
 * \param buf The buffer which should be included into the calculation.
 * \param size The size of the buffer
 */
- (void)updateWithBuffer: (const char*)buf
		  ofSize: (size_t)size;

/**
 * \return A buffer containing the hash. The size of the buffer is depending
 *	   on the hash used. The buffer is part of object's memory pool.
 */
- (uint8_t*)digest;

/**
 * \return A boolean whether the hash has already been calculated
 */
- (BOOL)isCalculated;
@end