ObjFW  Diff

Differences From Artifact [caf2773ad7]:

To Artifact [cb8976524d]:


20
21
22
23
24
25
26

27
28
29
30
31
32
33
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34







+







#include <string.h>
#include <limits.h>

#import "OFDataArray.h"
#import "OFString.h"
#import "OFFile.h"
#import "OFExceptions.h"
#import "base64.h"
#import "macros.h"

/* References for static linking */
void _references_to_categories_of_OFDataArray()
{
	_OFDataArray_Hashing_reference = 1;
};
299
300
301
302
303
304
305





306
307
308
309
310
311
312
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318







+
+
+
+
+







	OF_HASH_INIT(hash);
	for (i = 0; i < count * itemSize; i++)
		OF_HASH_ADD(hash, ((char*)data)[i]);
	OF_HASH_FINALIZE(hash);

	return hash;
}

- (OFString*)stringByBase64Encoding
{
	return of_base64_encode(data, count * itemSize);
}
@end

@implementation OFBigDataArray
- (void)addItem: (void*)item
{
	size_t nsize, lastpagebyte;