ObjFW  Diff

Differences From Artifact [d8543cb4a1]:

To Artifact [fabee7cd05]:


20
21
22
23
24
25
26



27
28
29
30
31
32
33
#include <string.h>

#import "OFMD5Hash.h"
#import "OFSecureData.h"

#import "OFHashAlreadyCalculatedException.h"
#import "OFOutOfRangeException.h"




@interface OFMD5Hash ()
- (void)of_resetState;
@end

#define F(a, b, c) (((a) & (b)) | (~(a) & (c)))
#define G(a, b, c) (((a) & (c)) | ((b) & ~(c)))







>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <string.h>

#import "OFMD5Hash.h"
#import "OFSecureData.h"

#import "OFHashAlreadyCalculatedException.h"
#import "OFOutOfRangeException.h"

#define DIGEST_SIZE 16
#define BLOCK_SIZE 64

@interface OFMD5Hash ()
- (void)of_resetState;
@end

#define F(a, b, c) (((a) & (b)) | (~(a) & (c)))
#define G(a, b, c) (((a) & (c)) | ((b) & ~(c)))
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
}

@implementation OFMD5Hash
@synthesize calculated = _calculated;

+ (size_t)digestSize
{
	return 16;
}

+ (size_t)blockSize
{
	return 64;
}

+ (instancetype)cryptoHash
{
	return [[[self alloc] init] autorelease];
}








|




|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
}

@implementation OFMD5Hash
@synthesize calculated = _calculated;

+ (size_t)digestSize
{
	return DIGEST_SIZE;
}

+ (size_t)blockSize
{
	return BLOCK_SIZE;
}

+ (instancetype)cryptoHash
{
	return [[[self alloc] init] autorelease];
}

162
163
164
165
166
167
168










169
170
171
172
173
174
175

- (void)dealloc
{
	[_iVarsData release];

	[super dealloc];
}











- (id)copy
{
	OFMD5Hash *copy = [[OFMD5Hash alloc] of_init];

	copy->_iVarsData = [_iVarsData copy];
	copy->_iVars = copy->_iVarsData.mutableItems;







>
>
>
>
>
>
>
>
>
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

- (void)dealloc
{
	[_iVarsData release];

	[super dealloc];
}

- (size_t)digestSize
{
	return DIGEST_SIZE;
}

- (size_t)blockSize
{
	return BLOCK_SIZE;
}

- (id)copy
{
	OFMD5Hash *copy = [[OFMD5Hash alloc] of_init];

	copy->_iVarsData = [_iVarsData copy];
	copy->_iVars = copy->_iVarsData.mutableItems;