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
|